• putting JUNK at the end of a [.py] file

    From Hen Hanna@21:1/5 to All on Thu Feb 23 16:21:37 2023
    in a LaTeX file, after the (1st) \end{document} line,
    i can put any random Junk i want (afterwards) until the end of the file.


    Is there a similar Method for a .py file ?

    Since i know of no such trick, i sometimes put this (below) at the end of a .py file.



    dummy= (""" junk and more junk
    words in Dict
    239 words in Dict
    ((( notes or Code fragmetns )))
    """ )



    ** maybe i don't need the dummy= but it looks better.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hen Hanna@21:1/5 to Thomas Passin on Thu Feb 23 21:37:54 2023
    On Thursday, February 23, 2023 at 9:17:05 PM UTC-8, Thomas Passin wrote:
    On 2/23/2023 7:21 PM, Hen Hanna wrote:

    in a LaTeX file, after the (1st) \end{document} line,
    i can put any random Junk i want (afterwards) until the end of the file.


    Is there a similar Method for a .py file ?

    Since i know of no such trick, i sometimes put this (below) at the end of a .py file.



    dummy= (""" junk and more junk
    words in Dict
    239 words in Dict
    ((( notes or Code fragmetns )))
    """)



    ** maybe i don't need the dummy= but it looks better.


    You can just put it in triple quotes, no need to assign the string to a variable. Or make each line a comment.


    thanks for the rare concise comment taht also seems devoid of insulting attitude.

    ( i still can't tell one person from another, but
    i did notice that one person sent me email
    that was really long, insulting, and creepy )


    i guess i use (""" """) because i wish it (this feature) came in matching pairs.

    and put dummy= to remind myself and to tell the compiler, obivously this Var is unused to feel free to ignore it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Hen Hanna on Fri Feb 24 00:16:33 2023
    On 2/23/2023 7:21 PM, Hen Hanna wrote:

    in a LaTeX file, after the (1st) \end{document} line,
    i can put any random Junk i want (afterwards) until the end of the file.


    Is there a similar Method for a .py file ?

    Since i know of no such trick, i sometimes put this (below) at the end of a .py file.



    dummy= (""" junk and more junk
    words in Dict
    239 words in Dict
    ((( notes or Code fragmetns )))
    """ )



    ** maybe i don't need the dummy= but it looks better.

    You can just put it in triple quotes, no need to assign the string to a variable. Or make each line a comment.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Loris Bennett@21:1/5 to Hen Hanna on Fri Feb 24 10:31:12 2023
    Hen Hanna <henhanna@gmail.com> writes:

    in a LaTeX file, after the (1st) \end{document} line,
    i can put any random Junk i want (afterwards) until the end of the file.


    Is there a similar Method for a .py file ?

    Since i know of no such trick, i sometimes put this (below) at the end of a .py file.



    dummy= (""" junk and more junk
    words in Dict
    239 words in Dict
    ((( notes or Code fragmetns )))
    """ )



    ** maybe i don't need the dummy= but it looks better.

    Apropos looking better:

    In my newsreader with a fixed-width font, I find your postings rather
    hard to read as there is a lot of, for me, inexplicable white space.

    Is there a particular reason why your postings are formatted like this?

    Cheers,

    Loris

    --
    This signature is currently under constuction.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mats Wichmann@21:1/5 to Thomas Passin on Fri Feb 24 08:27:56 2023
    On 2/23/23 22:16, Thomas Passin wrote:
    On 2/23/2023 7:21 PM, Hen Hanna wrote:

    in a LaTeX file,       after the (1st)       \end{document}     line,
           i can put any random Junk i want    (afterwards)   until the
    end of the file.


    Is there a similar Method  for a    .py     file ?

    Since i know of no such trick,  i sometimes put this (below) at the
    end of a .py file.



    dummy= ("""              junk and more junk
                                           words in Dict
                                 239  words in Dict >>                      (((  notes or Code fragmetns  ))) >>               """ )



    **    maybe i don't need the     dummy=     but it looks better.

    You can just put it in triple quotes, no need to assign the string to a variable.  Or make each line a comment.


    Indeed, I work on a project that by convention puts editor instructions
    at the end of each file (which some might consider junk :-) ), like this:


    # Local Variables:
    # tab-width:4
    # indent-tabs-mode:nil
    # End:
    # vim: set expandtab tabstop=4 shiftwidth=4:

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mats Wichmann@21:1/5 to Mats Wichmann on Fri Feb 24 08:33:38 2023
    On 2/24/23 08:27, Mats Wichmann wrote:


    Indeed, I work on a project that by convention puts editor instructions
    at the end of each file (which some might consider junk :-) ), like this:


    # Local Variables:
    # tab-width:4
    # indent-tabs-mode:nil
    # End:
    # vim: set expandtab tabstop=4 shiftwidth=4:

    I should probably have added that I know the above is unnecessary, as
    there is now a standard for defining this stuff once, called
    EditorConfig, which many editors understand natively, and many more via plugins.

    https://editorconfig.org/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Hen Hanna on Fri Feb 24 12:03:07 2023
    On 2/24/2023 12:37 AM, Hen Hanna wrote:
    On Thursday, February 23, 2023 at 9:17:05 PM UTC-8, Thomas Passin wrote:
    On 2/23/2023 7:21 PM, Hen Hanna wrote:

    in a LaTeX file, after the (1st) \end{document} line,
    i can put any random Junk i want (afterwards) until the end of the file. >>>

    Is there a similar Method for a .py file ?

    Since i know of no such trick, i sometimes put this (below) at the end of a .py file.



    dummy= (""" junk and more junk
    words in Dict
    239 words in Dict
    ((( notes or Code fragmetns )))
    """)



    ** maybe i don't need the dummy= but it looks better.


    You can just put it in triple quotes, no need to assign the string to a
    variable. Or make each line a comment.


    thanks for the rare concise comment taht also seems devoid of insulting attitude.

    ( i still can't tell one person from another, but
    i did notice that one person sent me email
    that was really long, insulting, and creepy )


    i guess i use (""" """) because i wish it (this feature) came in matching pairs.

    and put dummy= to remind myself and to tell the compiler, obivously this Var is unused to feel free to ignore it.

    The bare string will be evaluated but not assigned to any variable name.
    You don't need to tell the compiler anything. As an example, here is a
    tiny program that runs:

    """A little test program to verify that a floating string is OK."""

    MSG = 'this is a test'
    print(MSG)

    """This is a free-floating message
    that is just a note to myself.
    "

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)