[Python-Dev] String concatenation (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Sun Aug 3 20:29:43 CEST 2008
- Previous message: [Python-Dev] String concatenation
- Next message: [Python-Dev] String concatenation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Tres Seaver <tseaver palladion.com> writes:
-1. The feature exists to allow adherence to PEP-8, "Limit all lines to a maximum of 79 characters.", without requiring runtime concatenation costs. I use it frequently when assembling and testing message strings, for instance.
In many cases there is no runtime concatenation cost.
def f(): ... return "first" + "second" ... import dis dis.dis(f) 2 0 LOAD_CONST 3 ('firstsecond') 3 RETURN_VALUE
Regards
Antoine.
- Previous message: [Python-Dev] String concatenation
- Next message: [Python-Dev] String concatenation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]