[issue11017] optparse: error: invalid integer value

2011-01-27 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I think it’s good: optparse checks for a leading 0 and will use int(value, 8) 
in that case.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11017
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11017] optparse: error: invalid integer value

2011-01-27 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Well, it is certainly intentional, then.  Whether it is good is a different 
story, but also a moot question since optparse has been replaced by argparse.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11017
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11017] optparse: error: invalid integer value

2011-01-26 Thread hensing

New submission from hensing h.dick...@gmx.net:

OptionParser can't parse int 08 and 09. 8, 9 and 01..07 works.

--
components: Library (Lib)
files: minimal.py
messages: 127106
nosy: hensing
priority: normal
severity: normal
status: open
title: optparse: error: invalid integer value
type: crash
versions: Python 2.6
Added file: http://bugs.python.org/file20531/minimal.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11017
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11017] optparse: error: invalid integer value

2011-01-26 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

08 is not a valid octal number.  See 
http://docs.python.org/library/optparse#standard-option-types and 
http://docs.python.org/reference/lexical_analysis#integer-and-long-integer-literals

Hope this helps.

--
nosy: +eric.araujo
resolution:  - invalid
stage:  - committed/rejected
status: open - closed
type: crash - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11017
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11017] optparse: error: invalid integer value

2011-01-26 Thread hensing

hensing h.dick...@gmx.net added the comment:

Shouldn't it be better to parse only numbers with prefix 0o 0o72 as an 
octal number?

So it would be consistent to hex and bin (0x and 0b).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11017
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11017] optparse: error: invalid integer value

2011-01-26 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

That change has been done in Python 3.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11017
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11017] optparse: error: invalid integer value

2011-01-26 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

09 is still an invalid token in python3.  Since int('09') works in python2 it 
might be worth looking in to this further.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11017
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com