r/pythontips • • Apr 06 '19

Some Python anti-patterns

46 Upvotes

18 comments sorted by

View all comments

3

u/MegaIng Apr 06 '19 edited Apr 06 '19

I would actually disadvice the use of namedtuple in favor of dataclass (or at least NamedTuple). This is mainly for typehinting (which is a topic completely missing from the article.), but also for default parameter, mutability, and inheritance. Please, don't promot namedtuple.

0

u/CommonMisspellingBot Apr 06 '19

Hey, MegaIng, just a quick heads-up:
completly is actually spelled completely. You can remember it by ends with -ely.
Have a nice day!

The parent commenter can reply with 'delete' to delete this comment.

2

u/BooCMB Apr 06 '19

Hey /u/CommonMisspellingBot, just a quick heads up:
Your spelling hints are really shitty because they're all essentially "remember the fucking spelling of the fucking word".

And your fucking delete function doesn't work. You're useless.

Have a nice day!

Save your breath, I'm a ^bot.