classification
Title: optparse int, long types support binary, octal and hex forma
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gward Nosy List: gward, jlgijsbers, loewis, schmir, tebeka
Priority: normal Keywords: patch

Created on 2004-01-05 10:18 by tebeka, last changed 2008-01-31 08:39 by amaury.forgeotdarc. This issue is now closed.

Files
File name Uploaded Description Edit
optparse.diff tebeka, 2004-01-05 10:18 Diff for optparse.py and test_optparse.py
liboptparse.tex.diff tebeka, 2004-02-01 11:31 Diff for liboptparse.tex
Messages (8)
msg45129 - (view) Author: Miki Tebeka (tebeka) * Date: 2004-01-05 10:18
Hello,

I've added support for binary, octal and hexa number
with the "int" and "long" types.
binary : 0b10 (= 2)
octal : 010 (= 8)
hexa: 0x10 (= 16)

Diff for optparse.py and test_optparse.py attached.

Miki.
msg45130 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-01-31 12:39
Logged In: YES 
user_id=21627

Can you please provide a patch for Doc/lib/liboptparse.tex
as well?
msg45131 - (view) Author: Miki Tebeka (tebeka) * Date: 2004-02-01 11:31
Logged In: YES 
user_id=358087

Attached.
Please check it, English is *not* my native language.
msg45132 - (view) Author: Johannes Gijsbers (jlgijsbers) * (Python triager) Date: 2004-08-21 11:53
Logged In: YES 
user_id=469548

optparse.py is automatically generated from the Optik source
code, so you should file this against the Optik project
(http://sf.net/projects/optik/) instead of here. 

Still, liboptparse.tex isn't in the Optik project, so this
should be kept open as well.
msg45133 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-08-22 06:50
Logged In: YES 
user_id=21627

Ok, assigning this to Greg for consideration.
msg45134 - (view) Author: Greg Ward (gward) (Python committer) Date: 2004-11-06 02:07
Logged In: YES 
user_id=14422

Cool, I like the idea.  Couldn't use the patch directly,
since optparse.py and liboptparse.tex are generated from the
Optik source.  So I did it my own way.

BTW, a big *thank you* for providing test and doc patches
too.  Without those, I would have been much less likely to
accept this patch.

Checked in to Optik svn repository, r449.  Leaving this
patch until this is merged into Python CVS.
msg45135 - (view) Author: Greg Ward (gward) (Python committer) Date: 2005-03-19 17:07
Logged In: YES 
user_id=14422

Argh, I didn't get around to this in time for Python 2.4. 
It's already in Optik 1.5, but that was too late for Python
2.4, and it's a new feature so I can't port it to the Python
CVS tree before Python 2.5.  Oh well, it'll get there
eventually.
msg61888 - (view) Author: Ralf Schmitt (schmir) Date: 2008-01-31 08:21
python trunk supports this. please close.
History
Date User Action Args
2008-01-31 08:39:39amaury.forgeotdarcsetstatus: open -> closed
2008-01-31 08:21:27schmirsetnosy: + schmir
messages: + msg61888
2004-01-05 10:18:19tebekacreate