[ditrack commit] r1233 - src/trunk/DITrack/Command
Vlad Skvortsov
vss at 73rus.com
Wed Jan 31 13:51:16 PST 2007
Ivan Glushkov wrote:
> On Wed, 31 Jan 2007 23:10:40 +0200, <vss at ditrack.org> wrote:
>
>> Author: vss
>> Date: 2007-01-31 13:10:40 -0800 (Wed, 31 Jan 2007)
>> New Revision: 1233
>>
>> Modified:
>> src/trunk/DITrack/Command/new.py
>> Log:
>> Replace calls to print() with sys.stdout.write(). Minor style fixes.
>>
>>
[skipped]
> why sys.stdout.write instead of print?
> one more project rule? ;)
Print is often too smart (inserting spaces, newlines, etc) so we have to
use sys.stdout.write() to work that around. So we end up having two
methods to achieve a single goal, and one of the methods is more general
than the other. Thus, for consistency reasons, we stick to the more
general one.
Couldn't find a citation on the web, though "Python in a nutshell"
advises to use print() only for debugging purposes.
--
Vlad Skvortsov, vss at 73rus.com, http://vss.73rus.com
More information about the Dev
mailing list