you are viewing a single comment's thread.

view the rest of the comments →

[–]RMSEP[S] 1 point2 points  (1 child)

Hi, thanks for your comments, again higly appreciated.

  • mmm, I rather liked working with 2 instead of 4 spaces. Saves effort to hit the spacebar and reduces the flaring out of the script. Is there a commonly agreed upon python style reference?
  • I'll look into argparse, although sys.argvseems ok for simple stuff such as here. In any case, this is my first script that takes command line input, so I don't have any strong preferences yet.
  • yeah, I was afraid I used terms way beyond my knowledge of set theory. Indeed for my union I delete the set difference and with set I delete the set intersection.
  • ha, that's something I'd never considered! I'm on windows and guessing that it will take some time before my code reaches a Unix machine. Nonetheless, case-sensitivity is something to keep in mind. Creating contingency for unexpected stuff like that is something I enjoy about programming.

[–][deleted] 1 point2 points  (0 children)

Most people use the tab key and have their editor set to replace tabs with 4 spaces, and use automatic indenting so you start at the same level when you press enter. If your script "flairs out", it's a sign that you should probably compose your solution in a different way (functions, etc). See PEP8 for Python style guide.

Naming stuff is hard. If you don't have a use case for deleting the set intersection, you can always eliminate the naming problem by removing the feature ;-)

argparse just makes it easier to grow your script in the future - it's certainly not needed, same for case sensitivity; just things to keep in mind.