[Python-Dev] string formatting options and removing basestring.mod (WAS: Replacement for print in Python 3.0) (original) (raw)
Gareth McCaughan gmccaughan at synaptics-uk.com
Mon Sep 5 17:52:42 CEST 2005
- Previous message: [Python-Dev] string formatting options and removing basestring.__mod__ (WAS: Replacement for print in Python 3.0)
- Next message: [Python-Dev] string formatting and i18n
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I wrote:
C++'s << operator represents another way to do formatted output. I regard it as an object lesson in bad design.
... and should add: Of course it's usually seen as being about output more than about formatting, but in fact if you want to do what Python does with "%", C with "sprintf" and Common Lisp with (format nil ...) then the Right Thing in C++ (in so far as that exists) is usually to use << with a string stream.
-- g
- Previous message: [Python-Dev] string formatting options and removing basestring.__mod__ (WAS: Replacement for print in Python 3.0)
- Next message: [Python-Dev] string formatting and i18n
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]