Why chunks is not part of the python standard lib?
After reading How do you split a list into evenly sized chunks in Python?http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python and seeing this kind of mistakes happening https://code.djangoproject.com/ticket/18972 all the time. Why is not a chunks function in itertools? grouper from http://docs.python.org/2/library/itertools.html#recipes doesn't have the same behavior as chunks Example: chunks([1, 2, 3, 4, 5], 3)# Should return [[1, 2, 3], [4, 5]] or the iterator equivalent. Original Post on StackOverflow: http://stackoverflow.com/questions/16313008/why-chunks-is-not-part-of-the-python-standard-lib -- http://mail.python.org/mailman/listinfo/python-list
Re: Why chunks is not part of the python standard lib?
On 01/05/2013 07:26, Ricardo Azpeitia Pimentel wrote: After reading How do you split a list into evenly sized chunks in Python? http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python and seeing this kind of mistakes happening https://code.djangoproject.com/ticket/18972 all the time. Why is not a |chunks| function in itertools? |grouper| from http://docs.python.org/2/library/itertools.html#recipes doesn't have the same behavior as |chunks | Example: | |chunks([1, 2, 3, 4, 5], 3) # Should return [[1, 2, 3], [4, 5]] or the iterator equivalent.| |Original Post on StackOverflow: http://stackoverflow.com/questions/16313008/why-chunks-is-not-part-of-the-python-standard-lib Asked and answered a trillion times. There's no concensus on how chucks should behave. -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence -- http://mail.python.org/mailman/listinfo/python-list
RE: Drag and drop in Windows
Thanks Kevin, that looks great. It's having trouble finding TkDND though - is there a certain place in the Python27 directory that it's most likely to look? It's currently under Lib/site-packages, but I'm suspicious that Tk/Tkinter has its own library somewhere. Christian - you were right. The TkDND DLL looks to be for x64. Is there a way around this? All the best, Rob -Original Message- From: Python-list [mailto:python-list-bounces+robert.flintham=uhb.nhs...@python.org] On Behalf Of Kevin Walzer Sent: 01 May 2013 00:10 To: python-list@python.org Subject: Re: Drag and drop in Windows Official link: http://tkinterdnd.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list DISCLAIMER: This email and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful. -- http://mail.python.org/mailman/listinfo/python-list
Re: Drag and drop in Windows
Hi Robert, Am 01.05.13 10:06, schrieb Robert Flintham: Thanks Kevin, that looks great. It's having trouble finding TkDND though - is there a certain place in the Python27 directory that it's most likely to look? It's currently under Lib/site-packages, but I'm suspicious that Tk/Tkinter has its own library somewhere. Does it do a package require? In that case, check your auto path tk.eval('set auto_path') Tcl looks for the libs in the folders listed there. Christian - you were right. The TkDND DLL looks to be for x64. Is there a way around this? Just download the right version: http://sourceforge.net/projects/tkdnd/files/Windows%20Binaries/TkDND%202.6/ I haven't checked the content, but expect the *ix86.tar.gz file to be 32 bit, whereas the *x86_64.tar.gz is 64 bit (despite the win32 in the name). You can extract tar.gz using winzip for example. I think it is a mistake to package Windows binaries using tar.gz instead of ZIP. Christian -- http://mail.python.org/mailman/listinfo/python-list
Re: Finding referents with Gdb
Dave Butler da...@tanagerproductions.com writes: with gdb, can you find referents of an object given an object id? Usually no. gdb is a C level debugger. If debugging information is available (and the type of an object know), gdb can show you the fields of an object. If you know the correct type, you can cast an object to this type and get the field information. Thus, gdb gives you a possibility to examine the objects, a given object refers to. However, in general, there is no data structure (in a C program) that provides access to the objects that refer to a given object. In such cases, gdb cannot help you to find those objects. -- http://mail.python.org/mailman/listinfo/python-list
Re: Finding referents with Gdb
Dave Butler, 23.04.2013 16:52: with gdb, can you find referents of an object given an object id? Have you looked at the gc module? And, could you explain why you want to work with the object's ID instead of the object reference itself? Stefan -- http://mail.python.org/mailman/listinfo/python-list
Re: Why chunks is not part of the python standard lib?
On 1 May 2013 08:10, Mark Lawrence breamore...@yahoo.co.uk wrote: On 01/05/2013 07:26, Ricardo Azpeitia Pimentel wrote: After reading How do you split a list into evenly sized chunks in Python? http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python and seeing this kind of mistakes happening https://code.djangoproject.com/ticket/18972 all the time. Why is not a |chunks| function in itertools? |grouper| from http://docs.python.org/2/library/itertools.html#recipes doesn't have the same behavior as |chunks | Example: | |chunks([1, 2, 3, 4, 5], 3) # Should return [[1, 2, 3], [4, 5]] or the iterator equivalent.| |Original Post on StackOverflow: http://stackoverflow.com/questions/16313008/why-chunks-is-not-part-of-the-python-standard-lib Asked and answered a trillion times. There's no concensus on how chucks should behave. I'm not sure that's a valid argument against it since a chunks function could just do a different thing depending on the arguments given. The issue is around how to deal with the last chunk if it isn't the same length as the others and I can only think of 4 reasonable responses: 1) Yield a shorter chunk 2) Extend the chunk with fill values 3) Raise an error 4) Ignore the last chunk Cases 2 and 4 can be achieved with current itertools primitives e.g.: 2) izip_longest(fillvalue=fillvalue, *[iter(iterable)] * n) 4) zip(*[iter(iterable)] * n) However I have only ever had use cases for 1 and 3 and these are not currently possible without something additional (e.g. a generator function). In any case a chunks function can simply take arguments to give all 4 behaviours: def chunks(iterable, chunksize, uneven='return_short', fillvalue=None): # loop through yielding all even chunks # and then if uneven == 'return_short: yield chunk elif uneven == 'raise': raise ValueError('No items left') elif uneven == 'fill': yield chunk + [fillvalue] * (chunksize - len(chunk)) elif uneven == 'ignore': pass Oscar -- http://mail.python.org/mailman/listinfo/python-list
Re: in need of some help...
On Wednesday, 1 May 2013 05:37:34 UTC+1, Chris Angelico wrote: On Wed, May 1, 2013 at 9:20 AM, Alex Norton ayjayn1...@gmail.com wrote: the teacher actually cant teach anything, he as the knowledge of Vb but his teaching methods are abysmal and severely lacking, but he said we can use any language we feel more comfortable in. some are using VB others PHP and some in C ++. Quit the course and go study someplace else... I wouldn't want to be in any course where people use VB and PHP to build GUIs! ChrisA its a college course (Uk college btw) and its the last unit... im just gonna stick with it python is quite easy ot understand (reading wise) that the teacher can attempt to read it with my comments -- http://mail.python.org/mailman/listinfo/python-list
Re: Finding referents with Gdb
On Tue, Apr 23, 2013 at 9:52 AM, Dave Butler da...@tanagerproductions.com wrote: with gdb, can you find referents of an object given an object id? Look at the C code for gc.get_referents and set things up to call it from GDB. Skip -- http://mail.python.org/mailman/listinfo/python-list
Re: ANN: ActivePython 3.2.2.3 is now available
Will this be the last one? It has been two years. -- http://mail.python.org/mailman/listinfo/python-list
Re: in need of some help...
Alex Norton ayjayn1...@gmail.com wrote: thanks... ill take a look at the Qt event handling It's rather simple: instead of the program running through a sequence of steps, the program normally is basically doing nothing. It just reacts to events that normally come from the user, i.e. the user clicks on some icon or widget, or (s)he enters something via the keyboard. You etermine which of all the possible events to which widget are relevant to you, write handler functions for them and tell the widget to call some function when an event happens. The simplest case is a button: you want to react to it, so you write a function for what's to be done when it's clicked on and then tell Qt to call that function once it gets clicked (there are different events even for a simple push button, it can be clicked, just pushed, released etc.). And if you have set up everything for that you tell Qt to start waiting for events. So the steps are: 1. Tell Qt that this is a program using it app = QtGui.QApplication( sys.argv ) 2. Create your graphical interface (what you seem to have done more or less) 3. Connect desired events (what's called signals in Qt lingo) for a certain widget to the function to be called with something like your_widget.clicked.connect( your_function ) (replace 'clicked' with e.g. 'pushed' or 'released' when interested in a push or release signal instead) 4. Start the event loop (i.e. have Qt wait for the user to do something and call one of your functions if the user did something you're interested in) with app.exec_( ) When this returns the game is over. So you don't wait for keyboard input with input() like in your original program but instead tell Qt to do the waiting for you and call the appropriate function you defined when something interesting happens. What you probably will have to change about the graphical interface is that instead of using QLabel widgets for 'Air', 'Earth', 'Fire', 'Water' to use e.g. QPushButtons since QLabels are rather static objects - they don't receive any click events and it's rather likely some kind of event like this is what you're going to want to react to. And for that QPushButtons seem to be the simplest choice to start with. So have an 'Air' button (let's call it 'bAir' and then do bAir.clicked.connect( air_clicked ) after defining a function air_clicked() in which you deal with that case. that might be as simple as def air_clicked( ) : # Randomly pick one of 'air', 'fire', 'water' or 'earth' z = [ 'air', 'fire', 'water', earth' ][ random.randrange( 4 ) ] if z == 'air' : print( 'Stalemate' ) elif z == 'water' : print( 'Air removes Water, you win!' ) ... Now, when during the game the 'Air' button is clicked this function will get called. Of course, it might be nicer to have a result label some- where in the graphical interface which you set to the text instead of printing it out to the console. And you also will probably add some Quit button to end the game. Regards, Jens -- \ Jens Thoms Toerring ___ j...@toerring.de \__ http://toerring.de -- http://mail.python.org/mailman/listinfo/python-list
Re: Why chunks is not part of the python standard lib?
On 01/05/2013 10:00, Oscar Benjamin wrote: On 1 May 2013 08:10, Mark Lawrence breamore...@yahoo.co.uk wrote: On 01/05/2013 07:26, Ricardo Azpeitia Pimentel wrote: After reading How do you split a list into evenly sized chunks in Python? http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python and seeing this kind of mistakes happening https://code.djangoproject.com/ticket/18972 all the time. Why is not a |chunks| function in itertools? |grouper| from http://docs.python.org/2/library/itertools.html#recipes doesn't have the same behavior as |chunks | Example: | |chunks([1, 2, 3, 4, 5], 3) # Should return [[1, 2, 3], [4, 5]] or the iterator equivalent.| |Original Post on StackOverflow: http://stackoverflow.com/questions/16313008/why-chunks-is-not-part-of-the-python-standard-lib Asked and answered a trillion times. There's no concensus on how chucks should behave. I'm not sure that's a valid argument against it since a chunks function could just do a different thing depending on the arguments given. The issue is around how to deal with the last chunk if it isn't the same length as the others and I can only think of 4 reasonable responses: 1) Yield a shorter chunk 2) Extend the chunk with fill values 3) Raise an error 4) Ignore the last chunk Cases 2 and 4 can be achieved with current itertools primitives e.g.: 2) izip_longest(fillvalue=fillvalue, *[iter(iterable)] * n) 4) zip(*[iter(iterable)] * n) However I have only ever had use cases for 1 and 3 and these are not currently possible without something additional (e.g. a generator function). In any case a chunks function can simply take arguments to give all 4 behaviours: def chunks(iterable, chunksize, uneven='return_short', fillvalue=None): # loop through yielding all even chunks # and then if uneven == 'return_short: yield chunk elif uneven == 'raise': raise ValueError('No items left') elif uneven == 'fill': yield chunk + [fillvalue] * (chunksize - len(chunk)) elif uneven == 'ignore': pass Oscar All that's needed to get this into the standard library is to overcome this quote This has been rejected before. from http://bugs.python.org/issue6021#msg87745 -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence -- http://mail.python.org/mailman/listinfo/python-list
Re: ANN: ActivePython 3.2.2.3 is now available
On 5/1/13 8:01 AM, Robert wrote: Will this be the last one? It has been two years. Hard to say. AS has been focusing on cloud-based stuff lately. ActivePerl hasn't been updated for a long time either. ActiveTcl is still maintained. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
to a human - about 2to3
Hiya I have trawled around your various pages and haven't found what I want. I will start teaching Python to my pupils shortly. I have been looking for materials and have gathered a collection of programs. The problem is they are written in v2 and I have v3 installed in my classroom. I read about the 2to3 conversion program, but I can't get it to work. Could you possibly give me a Noddy's guide to do this? Thanks in anticipation. Jennifer J -- http://mail.python.org/mailman/listinfo/python-list
Re: to a human - about 2to3
Jennifer Butler j.but...@albynschool.co.uk writes: Hiya I have trawled around your various pages and haven’t found what I want. I will start teaching Python to my pupils shortly. I have been looking for materials and have gathered a collection of programs. The problem is they are written in v2 and I have v3 installed in my classroom. I read about the 2to3 conversion program, but I can’t get it to work. Could you possibly give me a Noddy’s guide to do this? Perhaps the first thing you should teach your students is how to ask questions :) When you say you can't get it to work what does that mean? What exactly did you do? What happened as a result? How did that differ from what you expected to happen or hoped would happen? Can you construct a minimal specific example that illustrates your problem? -- http://mail.python.org/mailman/listinfo/python-list
Re: to a human - about 2to3
On Thu, May 2, 2013 at 1:11 AM, Paul Rudin paul.nos...@rudin.co.uk wrote: Jennifer Butler j.but...@albynschool.co.uk writes: Hiya I have trawled around your various pages and haven’t found what I want. I will start teaching Python to my pupils shortly. I have been looking for materials and have gathered a collection of programs. The problem is they are written in v2 and I have v3 installed in my classroom. I read about the 2to3 conversion program, but I can’t get it to work. Could you possibly give me a Noddy’s guide to do this? Perhaps the first thing you should teach your students is how to ask questions :) Specifically, you and your students would do well spending a couple of sessions here: http://www.catb.org/esr/faqs/smart-questions.html 2to3 has fairly good --help information. In my porting projects, I started there and worked forward. Seemed to go fairly well. ChrisA -- http://mail.python.org/mailman/listinfo/python-list
Re: to a human - about 2to3
On 01/05/2013 15:52, Jennifer Butler wrote: I will start teaching Python to my pupils shortly. I have been looking for materials and have gathered a collection of programs. The problem is they are written in v2 and I have v3 installed in my classroom. I read about the 2to3 conversion program, but I can’t get it to work. Could you possibly give me a Noddy’s guide to do this? This might be useful: http://python3porting.com/2to3.html although it's not clear from your question whether you're competent in Python and just a little unclear on 2to3 or coming new to the whole thing and hoping that 2to3 will give you a pain-free conversion. If it's the latter then I'm afraid your ride may be rockier than you hoped. :( Also, I note that you're UK-based (albeit at the other end of it from where I am). Depending on where this thread goes you might get some local help by posting to the python-uk mailing list: http://mail.python.org/mailman/listinfo/python-uk It's a quiet list, mostly for local events and jobs, but you might find someone in your neighbourhood (or at least in your own country) who could give you some help. TJG -- http://mail.python.org/mailman/listinfo/python-list
Re: Why chunks is not part of the python standard lib?
01.05.13 09:26, Ricardo Azpeitia Pimentel написав(ла): After reading How do you split a list into evenly sized chunks in Python? http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python and seeing this kind of mistakes happening https://code.djangoproject.com/ticket/18972 all the time. Why is not a |chunks| function in itertools? Because not every 1 line function needs to be in the standard library. |chunks([1, 2, 3, 4, 5], 3) # Should return [[1, 2, 3], [4, 5]] or the iterator equivalent.| def chunks(seq, size): return [seq[i: i + size] for i in range(0, len(seq), size)] -- http://mail.python.org/mailman/listinfo/python-list
Re: Why chunks is not part of the python standard lib?
Serhiy Storchaka storch...@gmail.com writes: def chunks(seq, size): return [seq[i: i + size] for i in range(0, len(seq), size)] That's just for lists. An itertools version would work with arbitrary iterables. I've also had to rewrite that function more times than seems proper. -- http://mail.python.org/mailman/listinfo/python-list
Re: to a human - about 2to3
On 01/05/2013 15:52, Jennifer Butler wrote: Hiya I have trawled around your various pages and haven’t found what I want. I will start teaching Python to my pupils shortly. I have been looking for materials and have gathered a collection of programs. The problem is they are written in v2 and I have v3 installed in my classroom. I read about the 2to3 conversion program, but I can’t get it to work. Could you possibly give me a Noddy’s guide to do this? Thanks in anticipation. Jennifer J Here's the help output. I'd guess (as you don't specify exactly what doesn't work, 0/10, must try harder :) that you haven't specified -w, --write in which case the files don't get modified. c:\Users\Mark\MyPython2to3 --help Usage: 2to3 [options] file|dir ... Options: -h, --helpshow this help message and exit -d, --doctests_only Fix up doctests only -f FIX, --fix=FIX Each FIX specifies a transformation; default: all -j PROCESSES, --processes=PROCESSES Run 2to3 concurrently -x NOFIX, --nofix=NOFIX Prevent a transformation from being run -l, --list-fixes List available transformations -p, --print-function Modify the grammar so that print() is a function -v, --verbose More verbose logging --no-diffsDon't show diffs of the refactoring -w, --write Write back modified files -n, --nobackups Don't write backups for modified files -o OUTPUT_DIR, --output-dir=OUTPUT_DIR Put output files in this directory instead of overwriting the input files. Requires -n. -W, --write-unchanged-files Also write files even if no changes were required (useful with --output-dir); implies -w. --add-suffix=ADD_SUFFIX Append this string to all output filenames. Requires -n if non-empty. ex: --add-suffix='3' will generate .py3 files. -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence -- http://mail.python.org/mailman/listinfo/python-list
Re: to a human - about 2to3
On 5/1/2013 10:52 AM, Jennifer Butler wrote: I will start teaching Python to my pupils shortly. I have been looking for materials and have gathered a collection of programs. The problem is they are written in v2 and I have v3 installed in my classroom. I read about the 2to3 conversion program, but I can’t get it to work. You might find this page http://www.python.org/community/sigs/current/edu-sig/ and the education list itself. I am sure many programs useful in education have already been ported. Many simple programs, of the sort used in beginner classes need minimal change. Oftem 'print x' to 'print(x)' is all that is needed. 2to3 will do that for you, once you learn how to use it, but I have not. For the programs people post on the list, with just 1 or 2 prints, I make the change manually in the Idle editor before running. I often want to change other things as well, so no big deal. -- http://mail.python.org/mailman/listinfo/python-list
Re: The type/object distinction and possible synthesis of OOP and imperative programming languages
Here's a simple rule to resolve the ambiguity. Whoever publishes first, gets to claim origin of a word and its usage, kind of like a BDFL. The rest can adapt around that, make up their own word, or be corrected as the community requires. You seem to want to squeeze all of computer science and programming into a tidy hierarchy. It won't work, it's not tidy. I strongly suggest you read more about computer science before forming more opinions. You have a lot to learn ahead of you. Done: see the wikiwikiweb: http://c2.com/cgi/wiki?ComputerScienceVersionTwo -- MarkJ Tacoma, Washington -- http://mail.python.org/mailman/listinfo/python-list
Re: python.exe has stopped working when os.execl() runs on Windows 7
Reproduced in Windows 7 Ultimate: import os os.execl('ping.exe', '') At this point the REPL freezes, and windows prompts me to close Python since it stopped responding. -- Fábio Santos -- http://mail.python.org/mailman/listinfo/python-list
Re: How do I encode and decode this data to write to a file?
On 5/1/2013 5:20 PM, Tony the Tiger wrote: On Mon, 29 Apr 2013 10:47:46 +0100, cl wrote: raw = os.path.join(directory, self.getNameNoExtension()) + .html file = open(raw, w) file.write(.join(html).encode('utf-8')) file.close() This works for me: Python 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] on linux2 Type help, copyright, credits or license for more information. html='htmlheadtitleBlah/titlebodyéåäö/body/html' f=open('test.html', 'w') f.write(''.join(html.decode('utf-8').encode('utf-8'))) f.close() Perhaps there are better ways to do it. Your .write() line is exactly equivalent to: f.write(html) Because: if X is a UTF-8 bytestring, then: X.decode('utf-8').encode('utf-8') == X And if X is a bytestring, then: ''.join(X) == X --Ned. /Grrr -- http://mail.python.org/mailman/listinfo/python-list
Red Black Tree implementation?
What's the best Red Black Tree implementation for Python with an opensource license? I started out looking at http://newcenturycomputers.net/projects/rbtree.htmlbecause it was pretty high in Google and had the operators I wanted, but it gets very slow at about half a million elements. I've been discussing this with a C programmer who believes that Red Black Trees should perform very similarly to an AVL tree, but that's not at all what I'm getting with the newcenturycomputers implementation. I'd prefer something that looks like a dictionary, runs on 2.x and 3.x, and passes pylint, but if that's not yet available I might make it so. This is part of a comparison of Python tree types I did a while back... I've been thinking that I've given Red Black Trees short shrift by using a poor implementation. The comparison so far is at http://stromberg.dnsalias.org/~strombrg/python-tree-and-heap-comparison/ Thanks! -- http://mail.python.org/mailman/listinfo/python-list
Re: in need of some help...
Thank you very much for the specific detail. I have already done the signal for the finish button so that the app closes when clicked -- http://mail.python.org/mailman/listinfo/python-list
Re: How do I encode and decode this data to write to a file?
On 4/29/2013 5:47 AM, c...@isbd.net wrote: If I understand correctly the encode() is saying that it can't understand the data in the html because there's a character 0xc3 in it. I *think* this means that the é is encoded in UTF-8 already in the incoming data stream (should be as my system is wholly UTF-8 as far as I know and I created the directory name). So how do I change the code so I don't get the error? Do I just decode() the data first and then encode() it? BTW, I did a presentation at PyCon 2012 that many people have found helpful: Pragmatic Unicode, or, How Do I Stop the Pain: http://nedbatchelder.com/text/unipain.html . It explains the principles at work here. --Ned. -- http://mail.python.org/mailman/listinfo/python-list
Failure to build Python 3.3.2 SSL Module
Anyone have any thoughts on building Python 3.3.2 with the SSL module? I'm on RedHat Enterprise 6.4 and used Yum to install the openssl and openssl-devel 1.0.1e packages. But I keep getting a failure to build the SSL module - even if I set CFLAGS and LDFLAGS to find the headers and libs or additionally install the 0.9.8e OpenSSL. Any thoughts on what the build scripts are looking for or failing on? gcc -pthread -shared -pg -L/usr/lib64 -L/usr/lib64/openssl/engines -L/usr/lib64/openssl098e/engines -L/usr/lib64 -L/usr/lib64/openssl/engines -L/usr/lib64/openssl098e/engines -L/usr/lib64 -L/usr/lib64/openssl/engines -L/usr/lib64/openssl098e/engines -I/usr/include build/temp.linux-x86_64-3.3/home/idcuser/ftp/Python-3.3.1/Modules/_ctypes/_ctypes.o build/temp.linux-x86_64-3.3/home/idcuser/ftp/Python-3.3.1/Modules/_ctypes/callbacks.o build/temp.linux-x86_64-3.3/home/idcuser/ftp/Python-3.3.1/Modules/_ctypes/callproc.o build/temp.linux-x86_64-3.3/home/idcuser/ftp/Python-3.3.1/Modules/_ctypes/stgdict.o build/temp.linux-x86_64-3.3/home/idcuser/ftp/Python-3.3.1/Modules/_ctypes/cfield.o build/temp.linux-x86_64-3.3/home/idcuser/ftp/Python-3.3.1/Modules/_ctypes/libffi/src/prep_cif.o build/temp.linux-x86_64-3.3/home/idcuser/ftp/Python-3.3.1/Modules/_ctypes/libffi/src/closures.o build/temp.linux-x86_64-3.3/home/idcuser/ftp/Python-3.3.1/Modules/_ctypes/libffi/src/dlmalloc.o build/temp.linux-x86_64 -3.3/home/idcuser/ftp/Python-3.3.1/Modules/_ctypes/libffi/src/x86/ffi64.o build/temp.linux-x86_64-3.3/home/idcuser/ftp/Python-3.3.1/Modules/_ctypes/libffi/src/x86/unix64.o build/temp.linux-x86_64-3.3/home/idcuser/ftp/Python-3.3.1/Modules/_ctypes/libffi/src/x86/ffi.o build/temp.linux-x86_64-3.3/home/idcuser/ftp/Python-3.3.1/Modules/_ctypes/libffi/src/x86/sysv.o -L/usr/lib64 -L/usr/lib64/openssl/engines -L/usr/lib64/openssl098e/engines -L/usr/local/lib -o build/lib.linux-x86_64-3.3/_ctypes.cpython-33m.so Failed to build these modules: _ssl running build_scripts creating build/scripts-3.3 copying and adjusting /home/idcuser/ftp/Python-3.3.1/Tools/scripts/pydoc3 - build/scripts-3.3 copying and adjusting /home/idcuser/ftp/Python-3.3.1/Tools/scripts/idle3 - build/scripts-3.3 copying and adjusting /home/idcuser/ftp/Python-3.3.1/Tools/scripts/2to3 - build/scripts-3.3 copying and adjusting /home/idcuser/ftp/Python-3.3.1/Tools/scripts/pyvenv - build/scripts-3.3 changing mode of build/scripts-3.3/pydoc3 from 664 to 775 changing mode of build/scripts-3.3/idle3 from 664 to 775 changing mode of build/scripts-3.3/2to3 from 664 to 775 changing mode of build/scripts-3.3/pyvenv from 664 to 775 renaming build/scripts-3.3/pydoc3 to build/scripts-3.3/pydoc3.3 renaming build/scripts-3.3/idle3 to build/scripts-3.3/idle3.3 renaming build/scripts-3.3/2to3 to build/scripts-3.3/2to3-3.3 renaming build/scripts-3.3/pyvenv to build/scripts-3.3/pyvenv-3.3 real1m20.759s user2m6.167s sys 0m8.557s Thanks in advance! Cheers, George -- http://mail.python.org/mailman/listinfo/python-list
Re: The type/object distinction and possible synthesis of OOP and imperative programming languages
On May 2, 6:32 am, Mark Janssen dreamingforw...@gmail.com wrote: You seem to want to squeeze all of computer science and programming into a tidy hierarchy. It won't work, it's not tidy. I strongly suggest you read more about computer science before forming more opinions. You have a lot to learn ahead of you. Done: see the wikiwikiweb: http://c2.com/cgi/wiki?ComputerScienceVersionTwo There are two camps: Us, who are right and good. Them, who are wrong and evil. Us should be supported, whilst Them should be condemned. Wow. Justwow. Because the world really needs a manichean model of computation. -- http://mail.python.org/mailman/listinfo/python-list
Re: Red Black Tree implementation?
On 02/05/13 00:11, Dan Stromberg wrote: What's the best Red Black Tree implementation for Python with an opensource license? I started out looking at http://newcenturycomputers.net/projects/rbtree.html because it was pretty high in Google and had the operators I wanted, but it gets very slow at about half a million elements. I've been discussing this with a C programmer who believes that Red Black Trees should perform very similarly to an AVL tree, but that's not at all what I'm getting with the newcenturycomputers implementation. I'd prefer something that looks like a dictionary, runs on 2.x and 3.x, and passes pylint, but if that's not yet available I might make it so. This is part of a comparison of Python tree types I did a while back... I've been thinking that I've given Red Black Trees short shrift by using a poor implementation. The comparison so far is at http://stromberg.dnsalias.org/~strombrg/python-tree-and-heap-comparison/ Thanks! I have an implementation that you can try out. It's not based on any other implementation, so my bugs will be independent of any bugs in the code you're currently using. It looks more like a set - add, remove, discard. Not tried on Python 3 or run through pylint. I just tried adding a million items to a tree, and it takes about 25% longer to add items at the end compared to those at the beginning. Timing removals uncovered a bug. So if you want the code I'll fix the bug and send it (to your gmail e-mail address?). Cheers. Duncan -- http://mail.python.org/mailman/listinfo/python-list
Re: how to get next month string?
Hello. Is that you? Wondered what you had been up to lately and discovered that your email address hadn't transferred across to my new computer, so I had to resort to Google and found you on camp.lang.python - I hope! regards Steve On Tuesday, July 24, 2007 4:56:56 AM UTC-7, BartlebyScrivener wrote: On Jul 24, 5:31 am, Yinghe Chen yinghe.c...@jeppesen.com wrote: Hi, Could someone help on how to use python to output the next month string like this? AUG07, suppose now is July 2007. I usually find time and date answers somewhere in here: http://pleac.sourceforge.net/pleac_python/datesandtimes.html rd -- http://mail.python.org/mailman/listinfo/python-list
Re: Why chunks is not part of the python standard lib?
On Wed, 01 May 2013 10:00:04 +0100, Oscar Benjamin wrote: On 1 May 2013 08:10, Mark Lawrence breamore...@yahoo.co.uk wrote: On 01/05/2013 07:26, Ricardo Azpeitia Pimentel wrote: After reading How do you split a list into evenly sized chunks in Python? http://stackoverflow.com/questions/312443/how-do-you-split-a-list- into-evenly-sized-chunks-in-python and seeing this kind of mistakes happening https://code.djangoproject.com/ticket/18972 all the time. That bug is irrelevant to the question about chunking a sequence or iterator. Why is not a |chunks| function in itertools? [...] Asked and answered a trillion times. There's no concensus on how chucks should behave. I'm not sure that's a valid argument against it since a chunks function could just do a different thing depending on the arguments given. Yes, but that's a rubbish API. I'd rather have five separate functions. Or maybe five methods on a single Chunker object. I think the real reasons it's not in the standard library are: - there's no consensus on what chunking should do; - hence whatever gets added will disappoint some people; - unless you add all of them, in which case you've now got a significantly harder API (there are five chunk functions in itertools, which should I use?); - and none of them are actually very hard to write. So the prospect of adding chunks somewhere is unattractive: lots of angst for very little benefit. Yes, it could be done, but none of the Python developers, and especially not the itertools owner, Raymond Hettinger, think that the added complication is worth the benefit. The issue is around how to deal with the last chunk if it isn't the same length as the others and I can only think of 4 reasonable responses: That's not the only issue. What does chunking (grouping) even mean? Given: chunk(abcdef, 3) should I get this? [abc, def] or this? [abc, bcd, cde, def] There are good use-cases for both. If given a string, should chunking re-join the individual characters into strings, or leave them as lists of chars? Tuples of chars? E.g. chunk(abcdef, 3) = abc ... or [a, b, c] ... How about bytes? I have opinions on these questions, but I'm not going to give them to you. The point is that chunking means different things to different people. If you write your own, you get to pick whatever behaviour you like, instead of trying to satisfy everyone. 1) Yield a shorter chunk 2) Extend the chunk with fill values 3) Raise an error 4) Ignore the last chunk Cases 2 and 4 can be achieved with current itertools primitives e.g.: 2) izip_longest(fillvalue=fillvalue, *[iter(iterable)] * n) 4) zip(*[iter(iterable)] * n) However I have only ever had use cases for 1 and 3 and these are not currently possible without something additional (e.g. a generator function). All of these are trivial. Start with the grouper recipe from the itertools documentation, which is your case 2) above, renaming if desired: http://docs.python.org/2/library/itertools.html#recipes def chunk_pad(n, iterable, fillvalue=None): args = [iter(iterable)] * n return izip_longest(fillvalue=fillvalue, *args) Now define: def chunk_short(n, iterable): # Case 1) above sentinel = object() for chunk in chunk_pad(n, iterable, fillvalue=sentinel): if sentinel not in chunk: yield chunk else: i = chunk.index(sentinel) yield chunk[:i] def chunk_strict(n, iterable): # Case 3) above sentinel = object() for chunk in chunk_pad(n, iterable, fillvalue=sentinel): if sentinel in chunk: raise ValueError yield chunk def chunk(n, iterable): # Case 4) above args = [iter(iterable)]*n return izip(*args) def chunk_other(n, iterable): # I suck at thinking up names... it = iter(iterable) values = [next(it) for _ in range(n)] # What if this is short? while True: yield tuple(values) values.pop(0) try: values.append(next(it)) except StopIteration: break -- Steven -- http://mail.python.org/mailman/listinfo/python-list
[issue17887] docs: summary page - generator vs iterator vs iterable
New submission from anatoly techtonik: Docs lack a good summary page comparing three concepts. The main question is how do I tell if something is a sequence, generator, iterator or iterable? I found myself puzzled that range() is neither generator or iterator. -- assignee: docs@python components: Documentation messages: 188203 nosy: docs@python, techtonik priority: normal severity: normal status: open title: docs: summary page - generator vs iterator vs iterable ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17887 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10513] sqlite3.InterfaceError after commit
Paul Melis added the comment: Just a bit more info on the patch. When running stock Python 2.7.4 the attached test script bug-binding_parameter_0.py returns: module: 2.6.0 sqlite: 3.7.9 Archives Archives/2011 Archives/2012 Traceback (most recent call last): File bug-binding_parameter_0.py, line 45, in module cur = dbconn.execute('select uidvalidity from folders where name=?', (folder,)) sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type. The error suggests a misuse of the sqlite3 API, but the actual SQLite error is masked. After altering _sqlite/statement.c to include the SQLite error code (as in the patch), we get: module: 2.6.0 sqlite: 3.7.9 Archives Archives/2011 Archives/2012 Traceback (most recent call last): File bug-binding_parameter_0.py, line 45, in module cur = dbconn.execute('select uidvalidity from folders where name=?', (folder,)) sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type. (sqlite error 21) Error 21 = SQLITE_MISUSE, suggesting something is definitely wrong in the way the SQLite API is used (for this test case). Commenting out the ACTION_RESET all works fine again: module: 2.6.0 sqlite: 3.7.9 Archives Archives/2011 Archives/2012 -- Added file: http://bugs.python.org/file30087/bug-binding_parameter_0.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10513 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17874] ProcessPoolExecutor in interactive shell doesn't work in Windows
Richard Oudkerk added the comment: Ah. Then, a documentation error. The error message (queue.Full?) and the documentation are totally not clear about that. Once something goes wrong you are likely to get a cascade of errors, and the first one reported is not necessarily the original cause. Does ProcessPoolExecutor just not require tasks to be picklable in Unix? On Unix the main process forks using os.fork() when the executor is created. The forked processes inherit all the definitions previously created in the main process. Also, this raises questions about what exactly picklable means, and why it's not defined in the documentation. Since concurrent.futures uses multiprocessing the following section applies http://docs.python.org/dev/library/multiprocessing.html#windows -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17874 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK
Nidan added the comment: Why should asynchat.handle_read care about closed sockets if asyncore.recv does that already? Currently asynchat.handle_read handles empty strings from asycore.recv gracefully (by doing some unnecessary work aka executing the remainder of the function), it doesn't treat them specially. The only path that might cause asynchat.handle_read to close the socket requires asycore.recv to throw. Introducing None as possible return value from asyncore.recv therefore seems unnecessary to me. Changed the patch accordingly. -- Added file: http://bugs.python.org/file30088/issue16133.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16133 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16518] add buffer protocol to glossary
Roundup Robot added the comment: New changeset d1aa8a9eba44 by Ezio Melotti in branch '2.7': #16518: fix links in glossary entry. http://hg.python.org/cpython/rev/d1aa8a9eba44 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16518 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16518] add buffer protocol to glossary
Ezio Melotti added the comment: The attached patch replaces things like object that support the buffer protocol/interface/API with bytes-like objects throughout the docs. The patch doesn't change error messages/docstrings. I also noticed that on 2.7[0], the section about the buffer protocol in Doc/c-api/buffer.rst is called Buffers and Memoryview Objects and it's not as clear as the one on 3.x[1]. Should this section be backported? [0]: http://docs.python.org/2.7/c-api/buffer.html#bufferobjects [1]: http://docs.python.org/dev/c-api/buffer.html#bufferobjects -- Added file: http://bugs.python.org/file30089/issue16518-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16518 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16518] add buffer protocol to glossary
Antoine Pitrou added the comment: I also noticed that on 2.7[0], the section about the buffer protocol in Doc/c-api/buffer.rst is called Buffers and Memoryview Objects and it's not as clear as the one on 3.x[1]. Should this section be backported? The buffer protocol situation is different on 2.x, please let's concentrate on 3.x :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16518 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
Mark Dickinson added the comment: Relying on things like int64_t or uint64_t is tricky, both in principle *and* in practice. C99 (7.18.1.1) specifies that the types are optional, but that if the implementation provides types with the appropriate characteristics then the typenames should exist. I think we could probably get away with assuming the existence of uint32_t and int32_t and smaller types, but uint64_t and int64_t may be a stretch, particularly on ARM-style platforms. In practice, we've had significant difficulties in the past simply finding and identifying exact-width types in our autoconf machinery: whether they're defined in inttypes.h or stdint.h seems to vary from platform to platform, as does whether they're defined as typedef's or preprocessor macros. I *think* that since the issue #10052 fix, the current autoconf machinery is now fairly good at finding those types across platforms, but I wouldn't want to make any bets. I do agree that in principle it would be nice to define conversions for the fixed-width types and have everything else defer to those. There's also some cleanup to be done with respect to semantics; I think it's still the case that the various PyLong_FromXXX functions have different behaviours with respect to overflow, __int__, __index__ and the like. If we just blindly map the old functions to the fixed-width versions we're going to end up changing those semantics on some platforms. I'd be quite happy to see fixed-width conversion functions that *completely ignore* __int__ and __index__, and leave the magic stuff to general PyNumber_... functions. Adding skrah to the nosy, since this is something I think he's spent some time thinking about, too. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11078] Have test___all__ check for duplicates
Roundup Robot added the comment: New changeset 3f1bcfbed022 by Ezio Melotti in branch 'default': #11078: test___all__ now checks for duplicates in __all__. Initial patch by R. David Murray. http://hg.python.org/cpython/rev/3f1bcfbed022 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16141] Possible simplification for old-style exception handling code in stdlib
Ronald Oussoren added the comment: Shouldn't this issue be closed? (the proposed patch was applied in Oct. last year) -- nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16141 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11078] Have test___all__ check for duplicates
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4965] Can doc index of html version be separately scrollable?
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4965 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7855] Add test cases for ctypes/winreg for issues found in IronPython
Ezio Melotti added the comment: The attached patch now passes on Linux. I raised a SkipTest on non-Windows platforms and changed Lib/ctypes/test/__init__.py to handle it. If someone can confirm that the patch works on Windows I'll commit it. The ValueError I reported in my previous message has also been reported in #16396 and should be fixed. -- nosy: +terry.reedy, zach.ware versions: -Python 3.2 Added file: http://bugs.python.org/file30090/issue7855.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16396] Importing ctypes.wintypes on Linux gives a traceback
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - needs patch type: - behavior versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16396 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17841] Remove missing aliases from codecs documentation
Thomas Fenzl added the comment: This is a documentation patch against 3.3 with the aliases removed. -- keywords: +patch nosy: +Thomas Fenzl Added file: http://bugs.python.org/file30091/issue17841_codecs_docu.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13515] Consistent documentation practices for security concerns and considerations
Ezio Melotti added the comment: Attached a patch that includes the section proposed by Nick in the first message. I also changed in-line text with a note as suggested in msg148720. I didn't specify a ReST note because I think that depending on the situation, an actual warning, a note, or even an in-line text might be acceptable. -- components: +Devguide -Documentation stage: needs patch - patch review Added file: http://bugs.python.org/file30092/issue13515-devguide.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13515 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14097] Improve the introduction page of the tutorial
Ezio Melotti added the comment: If there aren't any comments I will commit this soon. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14097 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4
Georg Brandl added the comment: Would be nice, yes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17888] docs: more information on documentation team
New submission from anatoly techtonik: To help people understand that they can actually improve Python docs themselves, how about the following changes: http://docs.python.org/3/bugs.html - rename from Reporting Bugs to Dealing with Bugs. Explain that sometimes fixing bug is easier than reporting, because it involves less time from all people in total. Link to step-by-step documentation for the process and include channel for proposals how to make the process more streamlined. Add links to archive and d...@python.org mailing list info http://mail.python.org/mailman/listinfo/docs On this info page make it clear that Python documentation team is not a team in common narrow sense, but a group of volunteers open for everybody. Either by providing a link to team page with listed members, or by replacing the text: - Mailing list for the Python documentation team + Mailing list for people collaborating on Python docs -- assignee: docs@python components: Documentation messages: 188218 nosy: docs@python, techtonik priority: normal severity: normal status: open title: docs: more information on documentation team ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17888 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17888] docs: more information on documentation team
Georg Brandl added the comment: Sounds good, please prepare a patch. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17888 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17888] docs: more information on documentation team
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17888 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14679] Define an __all__ for html.parser
Roundup Robot added the comment: New changeset 1f7ce8af3356 by Ezio Melotti in branch 'default': #14679: add an __all__ (that contains only HTMLParser) to html.parser. http://hg.python.org/cpython/rev/1f7ce8af3356 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14679 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14679] Define an __all__ for html.parser
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14679 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17529] fix os.sendfile() documentation regarding the type of file descriptor
Roundup Robot added the comment: New changeset 4f45f9cde9b4 by Charles-Francois Natali in branch '3.3': Issue #17529: Fix os.sendfile() documentation regarding the type of file http://hg.python.org/cpython/rev/4f45f9cde9b4 New changeset 538055b28ba6 by Charles-Francois Natali in branch 'default': Issue #17529: Fix os.sendfile() documentation regarding the type of file http://hg.python.org/cpython/rev/538055b28ba6 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17529 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17529] fix os.sendfile() documentation regarding the type of file descriptor
Changes by Charles-François Natali cf.nat...@gmail.com: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17529 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17802] html.HTMLParser raises UnboundLocalError:
Roundup Robot added the comment: New changeset 9cb90c1a1a46 by Ezio Melotti in branch '3.3': #17802: Fix an UnboundLocalError in html.parser. Initial tests by Thomas Barlow. http://hg.python.org/cpython/rev/9cb90c1a1a46 New changeset 20be90a3a714 by Ezio Melotti in branch 'default': #17802: merge with 3.3. http://hg.python.org/cpython/rev/20be90a3a714 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17802 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13633] Handling of hex character references in HTMLParser.handle_charref
Ezio Melotti added the comment: Another option is to add a new convert_entities option that, when True, automatically converts character references and doesn't call handle_charref and handle_entityref. (See also #17802.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13633 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17802] html.HTMLParser raises UnboundLocalError:
Ezio Melotti added the comment: Fixed, thanks for the report! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17802 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16141] Possible simplification for old-style exception handling code in stdlib
R. David Murray added the comment: I'm guessing Serhiy left it open because of the question about multiprocessing and asyncore. Given that he rated them as dubious, let's just close it. -- nosy: +r.david.murray resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16141 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16523] attrgetter and itemgetter signatures in docs need cleanup
Ezio Melotti added the comment: Attached an updated patch that uses the double signature. -- stage: patch review - commit review versions: -Python 3.2 Added file: http://bugs.python.org/file30093/issue16523-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16523 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17810] Implement PEP 3154 (pickle protocol 4)
Antoine Pitrou added the comment: Here is an updated framing patch which supports pickletools.optimize(). -- Added file: http://bugs.python.org/file30094/framing2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17810 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17889] argparse subparsers break without without argument
New submission from SilentGhost: If you run attached file w/ 3.2 and 3.3 (and later) versions, you'll notice that the new version of parser doesn't handle empty argument list: $ python3.2 test.py usage: test.py [-h] {demo} ... test.py: error: too few arguments $ python3.3 test.py Namespace() Everything is naturally failing in 3.3 version as the execution continues with the empty Namespace. I suspect this is due to the issue10424 that removed explicit check for positionals. -- components: Library (Lib) files: test.py keywords: 3.3regression messages: 188228 nosy: SilentGhost, bethard, maker, r.david.murray priority: normal severity: normal status: open title: argparse subparsers break without without argument type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30095/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17888] docs: more information on documentation team
anatoly techtonik added the comment: May take a few days. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17888 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17282] document the defaultTest parameter to unittest.main()
Changes by Kyle Roberts roberts...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file30096/default_test_3.4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17282 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17282] document the defaultTest parameter to unittest.main()
Kyle Roberts added the comment: I've uploaded a patch documenting defaultTest in the latest branch and also in the previous branches. -- nosy: +kyle.roberts Added file: http://bugs.python.org/file30097/default_test_2.7-3.3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17282 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17889] argparse subparsers break without arguments
Changes by SilentGhost ghost@gmail.com: -- title: argparse subparsers break without without argument - argparse subparsers break without arguments ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7855] Add test cases for ctypes/winreg for issues found in IronPython
Zachary Ware added the comment: The patch works fine on Win 7 for me. I left a couple comments on Rietveld, neither of which is of great importance. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7855] Add test cases for ctypes/winreg for issues found in IronPython
Changes by Michael Foord mich...@voidspace.org.uk: -- nosy: -michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14097] Improve the introduction page of the tutorial
R. David Murray added the comment: Review comments added. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14097 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
Devin Jeanpierre added the comment: I don't know what context these types are being used in, but would int_least64_t suffice? C99 does require the existence of the [u]int_leastN_t types (for N in {8,16,32,64}), unlike [u]intN_t. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17889] argparse subparsers break without arguments
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - Undocumented (?) behaviour change in argparse from 3.2.3 to 3.3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16523] attrgetter and itemgetter signatures in docs need cleanup
Zachary Ware added the comment: I left a couple of Rietveld comments. Other than those nitpicks it looks good to me, and I could be convinced otherwise on the nitpicks :) Also, thanks for catching the extra commas after the Afters in operator.rst; I had meant to include those in the same patch that took them out of _operator.c, but apparently I missed it. -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16523 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13721] ssl.wrap_socket on a connected but failed connection succeeds and .peer_certificate gives AttributeError
Roundup Robot added the comment: New changeset e6b962fa44bb by Antoine Pitrou in branch 'default': Issue #13721: SSLSocket.getpeercert() and SSLSocket.do_handshake() now raise an OSError with ENOTCONN, instead of an AttributeError, when the SSLSocket is not connected. http://hg.python.org/cpython/rev/e6b962fa44bb -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13721] ssl.wrap_socket on a connected but failed connection succeeds and .peer_certificate gives AttributeError
Antoine Pitrou added the comment: Ok, this is fixed now. Thanks for the comments! -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
STINNER Victor added the comment: Relying on things like int64_t or uint64_t is tricky, both in principle *and* in practice. (...) uint64_t and int64_t may be a stretch, particularly on ARM-style platforms. I don't understand. Python is already using 64-bit types, in md5 module for example (MD5_INT64). This module is not compiled on ARM? In practice, we've had significant difficulties in the past simply finding and identifying exact-width types in our autoconf machinery: whether they're defined in inttypes.h or stdint.h seems to vary from platform to platform, as does whether they're defined as typedef's or preprocessor macros. I don't understand. AC_TYPE_UINT64_T is supposed to provide the uint64_t (unsigned integer of 64-bit). Autotool can also generate the stdint.h header if it is not available. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Changes by Antoine Pitrou pit...@free.fr: Added file: http://bugs.python.org/file30098/c43e264256e4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
STINNER Victor added the comment: I *think* that since the issue #10052 fix, the current autoconf machinery is now fairly good at finding those types across platforms, but I wouldn't want to make any bets. The issue #10052 was not that the int32_t was not present, but an #ifdef issue: This error occurs when HAVE_UINT32_T or HAVE_INT32_T are not defined. I don't understand why #ifdef HAVE_UINT32_T is tested, since configure ensures that uint32_t is always defined. (If it is not, it is defined in pyconfig.h using a #define.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
Mark Dickinson added the comment: I don't understand why #ifdef HAVE_UINT32_T is tested, since configure ensures that uint32_t is always defined. Take a look at the explanations in the autoconf file and in pyport.h. No, configure does *not* always ensure that uint32_t is defined: it does that only if the platform *doesn't* provide uint32_t, but does provide a 32-bit exact-width unsigned integer type (two's complement, no padding bits, etc. etc.). Which is why we need to make a second check for the case that the platform *does* define uint32_t directly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
Mark Dickinson added the comment: I don't understand. Python is already using 64-bit types, in md5 module for example (MD5_INT64). This module is not compiled on ARM? No idea. Do you have good evidence that 64-bit integer types *will* be supported on all platforms that we care about Python compiling on? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16308] Undocumented (?) behaviour change in argparse from 3.2.3 to 3.3.0
Changes by Michele Orrù maker...@gmail.com: -- nosy: +maker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16308 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Antoine Pitrou added the comment: In the spirit of pushing this forward, here is an updated patch using the sys.__interactivehook__ approach. I didn't add any tests since it doesn't seem very easy to write any. If nobody objects, I would like to commit this soon. -- Added file: http://bugs.python.org/file30099/defaultreadline.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.
Dmi Baranov added the comment: Attached patch for checking status code based at RFC 2616 [1]. Covered by tests. [1] http://tools.ietf.org/html/rfc2616#section-6.1.1 -- keywords: +patch nosy: +dmi.baranov Added file: http://bugs.python.org/file30100/issue17319.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
STINNER Victor added the comment: Ok, I think I understood the issue :-) The problem is when the uint32_t type is present but is not exactly 32-bit width. When using uint32_t, *I* expect that an array of uint32_t items will takes 4 x n bytes. In which case is it interesting to use an uint32_t which may be bigger? If there is an use case (speed maybe?), we should define a Py_uint32_t which is always present and always exaclty 32 bits. If there is no use case (ex: int_fast32_t or int_least32_t can be used instead), it is maybe better to replace the available type using a #define to use the expect type. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17833] test_gdb broken PPC64 Linux
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - dmalcolm stage: - commit review type: - behavior versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
Stefan Krah added the comment: Mark Dickinson rep...@bugs.python.org wrote: No idea. Do you have good evidence that 64-bit integer types *will* be supported on all platforms that we care about Python compiling on? I'm not sure how many people have tried to compile Python 3.3 on obscure platforms, but libmpdec currently requires manual intervention to switch on the without uint64_t mode: /* The following #error is just a warning. If the compiler indeed does * not have uint64_t, it is perfectly safe to comment out the #error. */ #error Warning: Compiler without uint64_t. Comment out this line. I did this because I'm almost certain that a failure to detect uint64_t is more likely a ./configure issue than an actual absence of the type. So far there have been no reports. libmpdec also uses stdint.h directly, and there haven't been any reports either. Some commercial Unix buildbots have loads of problems, but support stdint.h, static inline functions in headers and even the tricky extern inline C99 functions (See: http://www.greenend.org.uk/rjk/tech/inline.html). If other developers support it, I'd actually like to write a PEP that allows unrestricted direct use of stdint.h and static inline functions in header files for Python 3.4. My gut feeling is that if a platform doesn't have these features, it will likely be the least of their problems. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16396] Importing ctypes.wintypes on Linux gives a traceback
Dmi Baranov added the comment: Found only this patch [1] :) I think is possible to change VARIANT_BOOL._type_ to any of short types [2] for non-nt platforms? [1] https://code.launchpad.net/~mandel/python-distutils-extra/import_issues/+merge/53519 [2] http://msdn.microsoft.com/en-us/library/cc237864.aspx -- nosy: +dmi.baranov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16396 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17884] Try to reuse stdint.h types like int32_t
Stefan Krah added the comment: Mark Dickinson rep...@bugs.python.org wrote: There's also some cleanup to be done with respect to semantics; I think it's still the case that the various PyLong_FromXXX functions have different behaviours with respect to overflow, __int__, __index__ and the like. If we just blindly map the old functions to the fixed-width versions we're going to end up changing those semantics on some platforms. That could be a problem. It's tempting though, since we'd finally have a uniform behavior for the PyLong_FromXXX functions (#12965). I'd be quite happy to see fixed-width conversion functions that *completely ignore* __int__ and __index__, and leave the magic stuff to general PyNumber_... functions. Definitely. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17170] string method lookup is too slow
Changes by Martin Morrison m...@ensoft.co.uk: -- nosy: +isoschiz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17878] There is no way to get a list of available codecs
Dmi Baranov added the comment: I think its not possible while codecs registry contains search callbacks (stateless-registry) -- components: +Library (Lib) nosy: +dmi.baranov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17878 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK
Giampaolo Rodola' added the comment: recv() returning an empty string has always been an alias for connection lost though, that is why it cannot be used and I was proposing returning a new type in Python 3.4. Point is we're paying a bad design decision: asyncore shouldn't have asked the user to call recv() directly in the first place and call a data_received(chunk) callback method instead. Deciding what's best to do at this point without breaking existent code is not easy, that is why I think that on python = 3.3 we should fix *asynchat* in order to take EAGAIN/EWOULDBLOCK into account and leave asyncore's recv() alone. The issue would still exist but it would be mitigated by the fact that who wants to write a protocol is likely to use asynchat, not asyncore. As for Python 3.4 we can: - make asyncore's recv() return None and document it - deprecate recv() - introduce data_received(chunk) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16133 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17816] Weak*Dictionary KeyErrors during callbacks
Nils Bruin added the comment: One solution is to patch both WeakValueDictionary and WeakKeyDictionary with their own clear methods where we first store the strong links (to keys, resp. values) in a list, then clear the underlying dictionaries (this will now trigger the deletion of the weakrefs, so all callbacks are neutralized), and then delete the list. It does use more storage that way, but it gets rid of the ignored key errors. This is a different problem from issue7105, which deals with the (much more complicated) scenario of avoiding dictionary reshaping due to GC when iterators are still (potentially) active. -- keywords: +patch Added file: http://bugs.python.org/file30101/17816_custom_clear.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17816 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17890] argparse: mutually exclusive groups full of suppressed args can cause AssertionErrors
New submission from Garrett Holmstrom: When it goes to format a usage message, argparse seems to (correctly) fail to satisfy one of its assertions when all of the following are true: 1. A mutually exclusive group contains only args that are suppressed 2. An unsuppressed arg follows that group 3. The usage is long enough to need to line-wrap The cause seems to be that the set of regular expressions that argparse uses to clean up mutually exclusive groups' separators doesn't handle the space that follows what would otherwise be an empty pair of square braces, sort of like this: 1. [-h] [ ] [--spam] ... 2. [-h] [] [--spam] ... 3. [-h] [--spam] ... A test case is attached. I was able to reproduce this with python-2.7.3-13.fc18.x86_64 on Fedora as well as with commit 83588:e6b962fa44bb in 3.4 mainline. I have a small patch for the latter that I'll submit shortly. Sorry if I missed anything. This is my first bug report against python proper. -- components: Library (Lib) files: argparse-assertfail.py messages: 188250 nosy: gholms priority: normal severity: normal status: open title: argparse: mutually exclusive groups full of suppressed args can cause AssertionErrors type: behavior versions: Python 2.7, Python 3.4 Added file: http://bugs.python.org/file30102/argparse-assertfail.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17449] dev guide appears not to cover the benchmarking suite
Meador Inge added the comment: I think this will be useful information. I tend to doing benchmarks rather infrequently. Whenever I do them I forgot how I setup the suite the previous time around. In fact, I found this issue just now while googling for how to setup and run the official benchmark suite :-) -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17449 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17890] argparse: mutually exclusive groups full of suppressed args can cause AssertionErrors
Changes by Garrett Holmstrom gho...@devzero.com: -- hgrepos: +187 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag stage: - patch review versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com