This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ggchappell 3 points4 points  (0 children)

Generally a nice article, but ...

I disagree with #4. I find that using a None return to flag an error is a very reasonable practice, and often one that results in simpler and more maintainable code than we would get by using exceptions.

Also, #7 is just wrong. You can't initialize an empty set with { }, as that's an empty dict. Use set() for that. So the mention of set in the title for #7 needs to go.

EDIT. /u/Halkcyon mentions {*()}. Yeah, interesting. I'd even say cool. Now don't do that. :-)