[issue7852] [PATCH] Drop "Computer" from "Apple Computer" in plistlib

2010-02-04 Thread Wang Chun
New submission from Wang Chun : Apple's official utilities had been dropped the word "Computer". We should follow them. imac:~$ cat test.py __import__('plistlib').writePlist({}, 'test.plist') imac:~$ python test.py imac:~$ cat test.py __import__('plis

[issue7852] [PATCH] Drop "Computer" from "Apple Computer" in plistlib

2010-02-05 Thread Wang Chun
Wang Chun added the comment: plutil is a command shipped with every Mac. See the example in my original post. -- ___ Python tracker <http://bugs.python.org/issue7

[issue1982] Feature: extend strftime to accept milliseconds

2008-10-29 Thread Wang Chun
Wang Chun <[EMAIL PROTECTED]> added the comment: Ruby recently added support of millisecond and nanosecond to strftime. This is their changeset: http://redmine.ruby-lang.org/repositories/revision/ruby-19?rev=18731 To use the extended strftime, one can do: >> Time.now.strftime(&#x

[issue4227] unicode_literals and print_function do not work together.

2008-10-29 Thread Wang Chun
New submission from Wang Chun <[EMAIL PROTECTED]>: If "from __future__ import unicode_literals, print_function", unicode_literals works, but not print_function; If "from __future__ import print_function, unicode_literals", print_function works, but not unicode_litera

[issue2173] Python fails silently on bad locale

2008-11-12 Thread Wang Chun
Wang Chun <[EMAIL PROTECTED]> added the comment: This issue remains unsolved in the latest python 3.0rc2+ subversion repository as of 2008-11-13. -- nosy: +wangchun ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4629] getopt should not accept no_argument that ends with '='

2008-12-10 Thread Wang Chun
New submission from Wang Chun <[EMAIL PROTECTED]>: Consider the following program tmp.py: import sys, getopt print(getopt.getopt(sys.argv[1:], '', ['help'])) The program accept "--help" without a value: python helloworld.py --help But if someone invoke the

[issue4629] getopt should not accept no_argument that ends with '='

2008-12-10 Thread Wang Chun
Changes by Wang Chun <[EMAIL PROTECTED]>: -- keywords: +patch Added file: http://bugs.python.org/file12325/getopt.py.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4650] getopt need re-factor...

2008-12-12 Thread Wang Chun
New submission from Wang Chun : I created #4629 a couple of days ago. And besides that issue, for Python 3.x, I guess we can remove getopt.error since Python 3.x does not have to backward compatible with Python 2.x. And another issue is, GetoptError does not render right error message with

[issue4651] getopt need re-factor...

2008-12-12 Thread Wang Chun
New submission from Wang Chun : I created #4629 a couple of days ago. And besides that issue, for Python 3.x, I guess we can remove getopt.error since Python 3.x does not have to backward compatible with Python 2.x. And another issue is, GetoptError does not render right error message with

[issue5885] uuid.uuid1() is too slow

2009-04-30 Thread Wang Chun
New submission from Wang Chun : uuid.uuid1() currently uses two different ways to generate a uuid. If the system call "uuid_generate_time" is available, uuid1() uses the system call via the ctypes interface, otherwise, it uses pure Python code to generate a uuid. The problem

[issue5885] uuid.uuid1() is too slow

2009-04-30 Thread Wang Chun
Wang Chun added the comment: This is my test on another faster machine. $ cat test.py import sys, time, uuid N = int(sys.argv[1]) t = time.time() for x in xrange(N): uuid.uuid1() print('%.3f microseconds' % ((time.time() - t) * 100.0 / N)) $ cat test.c #include #include

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-05-25 Thread Wang Chun
New submission from Wang Chun : PEP-0372 and Issue 5381 both say json.dumps respect OrderedDict's iteration order, but the example in them do not work on my latest trunk build. $ uname -a Linux 12.38 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/