[Python-Dev] transitioning from % to {} formatting (original) (raw)
Lie Ryan lie.1296 at gmail.com
Sun Oct 18 06:11:16 CEST 2009
- Previous message: [Python-Dev] transitioning from % to {} formatting
- Next message: [Python-Dev] summary of transitioning from % to {} formatting
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Michael Foord wrote:
Benjamin Peterson wrote:
2009/10/5 Nick Coghlan <ncoghlan at gmail.com>:
So I would agree that method invocation on literals (particularly string literals) is an already established language idiom.
And who hasn't ever used 4.56.asintegerratio()? :)
I've tried 4.add a few times (not for a while now though).
That's a Syntax Error
4.add File "", line 1 4.add ^ SyntaxError: invalid syntax
however this works:
4 .add <method-wrapper '__add__' of int object at 0x1E1FA028>
- Previous message: [Python-Dev] transitioning from % to {} formatting
- Next message: [Python-Dev] summary of transitioning from % to {} formatting
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]