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.