G2P added the comment:
Trying to spec this, here is a proposed API:
parser = argparse.ArgumentParser()
sub = parser.add_subparsers(default='show')
sub_show = sub.add_parser('show')
sub_add = sub.add_parser('add')
If default isn't passed
G2P added the comment:
The bug still exists in Python 2.6 (2.6.7-4ubuntu2). Python 2.7
(2.7.3-5ubuntu4) works correctly. I don't have Python 2.5 on hand to check.
Here is a very simple test case:
import array, fcntl
buf = array.array('B', [0]*1024)
fcntl.ioctl(0, termios.TI
G2P added the comment:
Also happens in 2.5.2-2ubuntu6 and 2.4.5-1ubuntu4.2, FWIW.
--
versions: +Python 2.6
___
Python tracker
<http://bugs.python.org/issue1520