Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Virus using Python
#8
(Dec-06-2016, 02:26 PM)sparkz_alot Wrote: Besides, each 'def' has a line (double quoted in blue) which explains what it does (which you should comment out or the program won't run).

That's actually not accurate. Strings are valid syntax, even if you're not assigning them to anything or using them for anything.
Using a string like this actually creates documentation, and that string will be displayed if you call help() on the function:
>>> def spam():
...   "can really wizzle the whicket"
...   pass
...

>>> help(spam)
Help on function spam in module __main__:

spam()
    can really wizzle the whicket

>>>
Reply


Messages In This Thread
Virus using Python - by miira - Nov-29-2016, 07:00 PM
RE: Virus using Python - by Yoriz - Nov-29-2016, 07:16 PM
RE: Virus using Python - by Larz60+ - Nov-29-2016, 08:46 PM
RE: Virus using Python - by Ofnuts - Nov-29-2016, 09:43 PM
RE: Virus using Python - by nilamo - Nov-29-2016, 10:36 PM
RE: Virus using Python - by miira - Dec-06-2016, 12:24 AM
RE: Virus using Python - by sparkz_alot - Dec-06-2016, 02:26 PM
RE: Virus using Python - by nilamo - Dec-06-2016, 03:34 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020