r/Python • Freelancer. AnyFactor.xyz • Sep 16 '20

News An update on Python 4

Post image
3.3k Upvotes

389 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Sep 16 '20

[deleted]

12

u/hillgod Sep 16 '20

It's definitely not an anti-pattern, and, in fact, the literals perform faster.

-1

u/[deleted] Sep 16 '20

How do they perform faster? Surely it's the same method?

8

u/SaltyHashes Sep 16 '20

IIRC it's faster because it doesn't even have to call a method.

→ More replies (2)