Re: howto remove the thousand separator

2013-04-15 Thread Steven D'Aprano
On Mon, 15 Apr 2013 03:19:43 +0100, Rotwang wrote: On 15/04/2013 02:14, Steven D'Aprano wrote: On Sun, 14 Apr 2013 17:44:28 -0700, Mark Janssen wrote: On Sun, Apr 14, 2013 at 5:29 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 14 Apr 2013 12:06:12 -0700, Mark

Re: howto remove the thousand separator

2013-04-15 Thread Steven D'Aprano
On Sun, 14 Apr 2013 22:35:42 -0400, Roy Smith wrote: In article kkfodv$f5m$1...@news.albasani.net, Walter Hurry walterhu...@lavabit.com wrote: On Mon, 15 Apr 2013 11:29:17 +1000, Chris Angelico wrote: There are actually a lot of optimizations done, so it might turn out to be O(n) in

Re: classes and sub classes?

2013-04-15 Thread Peter Otten
Jason Friedman wrote: NwInvDb = NetworkInventoryDatabase, yes you are correct, it creates the database handle and makes it ready for use. I am interested in opinions. I for one dislike abbreviations on the theory that programs are read more than they are written. I would probably use

Re: howto remove the thousand separator

2013-04-15 Thread Chris Angelico
On Mon, Apr 15, 2013 at 5:03 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Mon, 15 Apr 2013 03:19:43 +0100, Rotwang wrote: On 15/04/2013 02:14, Steven D'Aprano wrote: Strings are immutable. Consider building up a single string from four substrings: Actually, I believe

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Uday S Reddy
Mark Janssen writes: After the 2001 type/class unification , it went towards Alan Kay's ideal of everything is an object As a contrast, this is very distinct from C++, where everything is concretely rooted in the language's type model which in *itself* is rooted (from it's long

RE: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Moez AbdelGawad
Date: Sun, 14 Apr 2013 22:55:59 -0700 From: deles...@gmail.com To: dreamingforw...@gmail.com CC: types-l...@lists.seas.upenn.edu; python-list@python.org Subject: Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages [ The Types

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Steven D'Aprano
On Sun, 14 Apr 2013 20:48:05 -0700, Mark Janssen wrote: Hello, I'm new to the list and hoping this might be the right place to introduce something that has provoked a bit of an argument in my programming community. I'm from the Python programming community. Python is an interpreted

RE: Iterating dictionary items + if statement results in problems

2013-04-15 Thread Ombongi Moraa Fe
hello Team, I have this fairly simple script to iterate the dictionary items and check if the items match certain values; dictionary={'1234567890':001, '0987654321':002} for k, v in dictionary.iteritems(): . . #suds client statements; if (k == '1234567890' and v

Re: Iterating dictionary items + if statement results in problems

2013-04-15 Thread Mark Lawrence
On 15/04/2013 11:50, Ombongi Moraa Fe wrote: hello Team, I have this fairly simple script to iterate the dictionary items and check if the items match certain values; dictionary={'1234567890':001, '0987654321':002} for k, v in dictionary.iteritems(): . . #suds client

RE: Iterating dictionary items + if statement results in problems

2013-04-15 Thread Peter Otten
Ombongi Moraa Fe wrote: hello Team, I have this fairly simple script to iterate the dictionary items and check if the items match certain values; dictionary={'1234567890':001, '0987654321':002} for k, v in dictionary.iteritems(): . . #suds client statements;

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-15 Thread rusi
I am trying to understand your points Chris. On the one hand you say: On Apr 14, 6:22 pm, Chris Angelico ros...@gmail.com wrote: No, no, a thousand times no! If I am doing financial transactions, even if I'm alone on my machine, I will demand full ACID compliance. On the other you describe a

Re: Iterating dictionary items + if statement results in problems

2013-04-15 Thread Dave Angel
On 04/15/2013 06:50 AM, Ombongi Moraa Fe wrote: hello Team, I have this fairly simple script to iterate the dictionary items and check if the items match certain values; dictionary={'1234567890':001, '0987654321':002} for k, v in dictionary.iteritems(): . . #suds

Re: classes and sub classes?

2013-04-15 Thread Neil Cerutti
On 2013-04-15, Peter Otten __pete...@web.de wrote: Jason Friedman wrote: NwInvDb = NetworkInventoryDatabase, yes you are correct, it creates the database handle and makes it ready for use. I am interested in opinions. I for one dislike abbreviations on the theory that programs are read

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-15 Thread Chris Angelico
On Mon, Apr 15, 2013 at 9:45 PM, rusi rustompm...@gmail.com wrote: I am trying to understand your points Chris. On the one hand you say: On Apr 14, 6:22 pm, Chris Angelico ros...@gmail.com wrote: No, no, a thousand times no! If I am doing financial transactions, even if I'm alone on my

Re: Grammar question: Englisn and Python: qualified names

2013-04-15 Thread Tim Chase
On 2013-04-15 07:50, Chris Angelico wrote: Quirky question time! ... or possibly a collections.OrderedDict... ... or possibly an collections.OrderedDict... If you're smart enough to elide the collections [dot] from your pronunciation, you're smart enough to adjust the a/an accordingly. Use the

Making ETL from Access 97 to Access 2003

2013-04-15 Thread Steeve
Hi, I need to take data from 5 differents (but similar) database in MS Access 97 and merge them into one MS Access 2003 database. Is some packages exist to do this task? Thank -- http://mail.python.org/mailman/listinfo/python-list

Re: Grammar question: Englisn and Python: qualified names

2013-04-15 Thread Chris Angelico
On Mon, Apr 15, 2013 at 10:28 PM, Tim Chase python.l...@tim.thechases.com wrote: On 2013-04-15 07:50, Chris Angelico wrote: Quirky question time! ... or possibly a collections.OrderedDict... ... or possibly an collections.OrderedDict... If you're smart enough to elide the collections [dot]

Re: Making ETL from Access 97 to Access 2003

2013-04-15 Thread rusi
On Apr 15, 5:27 pm, Steeve steeve.h...@gmail.com wrote: Hi, I need to take data from 5 differents (but similar) database in MS Access 97 and merge them into one MS Access 2003 database. Not sure what this had to do with python. However… You could write out the five as csvs and then read in

Re: Iterating dictionary items + if statement results in problems

2013-04-15 Thread Ombongi Moraa Fe
Hello Team, Thanks for your input. |Possibly it's not matching because of your mistaken use of octal. Octal won't hurt for ints below 8, but you probably don't restrict it in the real code. For example, v = 030 will not match equal in the following: I've changed the key,value pairs in the

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Matthias Felleisen
On Apr 14, 2013, at 11:48 PM, Mark Janssen wrote: After the 2001 type/class unification , it went towards Alan Kay's ideal Are you sure? Remember Kay's two motivations [*], which he so elegantly describes with [the] large scale one was to find a better module scheme for complex systems

Cross-compiling Python for ARM?

2013-04-15 Thread Gilles
Hello I tried running uWSGI on an ARM-based appliance, but it fails. Apparently, it could be due to the official Python 2.6.6 interpreter in the depot not being compiled the way uWSGI expects it to be: ./configure --enable-shared; make; make install;

Re: Making ETL from Access 97 to Access 2003

2013-04-15 Thread Paul Simon
rusi rustompm...@gmail.com wrote in message news:ff550c58-58b0-4bf2-bf12-08986ab2b...@ka6g2000pbb.googlegroups.com... On Apr 15, 5:27 pm, Steeve steeve.h...@gmail.com wrote: Hi, I need to take data from 5 differents (but similar) database in MS Access 97 and merge them into one MS Access

Re: Making ETL from Access 97 to Access 2003

2013-04-15 Thread rusi
Its hard to distinguish what you are saying from what I said because you've lost the quotes. On Apr 15, 9:01 pm, Paul Simon psi...@sonic.net wrote: rusi rustompm...@gmail.com wrote in message news:ff550c58-58b0-4bf2-bf12-08986ab2b...@ka6g2000pbb.googlegroups.com... On Apr 15, 5:27 pm, Steeve

Re: Threadpool item mailboxes design problem

2013-04-15 Thread Charles Hixson
On 04/14/2013 07:32 PM, Chris Rebert wrote: On Apr 14, 2013 4:27 PM, Charles Hixson charleshi...@earthlink.net mailto:charleshi...@earthlink.net wrote: What is the best approach to implementing actors that accept and post messages (and have no other external contacts). You might look at

Re: Iterating dictionary items + if statement results in problems

2013-04-15 Thread Dave Angel
On 04/15/2013 09:37 AM, Ombongi Moraa Fe wrote: Hello Team, Thanks for your input. |Possibly it's not matching because of your mistaken use of octal. Octal won't hurt for ints below 8, but you probably don't restrict it in the real code. For example, v = 030 will not match equal in the

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Antoon Pardon
Op 15-04-13 12:11, Steven D'Aprano schreef: Python's data model has always been 100% object oriented. Prior to the class/type unification, it simply had *two distinct* implementations of objects: types, which were written in C, and classes, which were written in Python. After unification, the

Process tuple contents on the fly

2013-04-15 Thread Gnarlodious
Say I have a tuple I want to expand assigning to variables: tup = *func() var = tup[0] lst.append(tup[1]) Or could I do it in one line? var, lst.append() = *func() So I want to append one variable to a list on the fly, is it possible? -- Gnarlie http://gnarlodious.com --

Re: Unicode issue with Python v3.3

2013-04-15 Thread Νίκος Γκρ33κ
Hello, can you still help me please? -- http://mail.python.org/mailman/listinfo/python-list

Re: Process tuple contents on the fly

2013-04-15 Thread Tim Chase
On 2013-04-15 11:25, Gnarlodious wrote: Say I have a tuple I want to expand assigning to variables: tup = *func() var = tup[0] lst.append(tup[1]) Or could I do it in one line? var, lst.append() = *func() So I want to append one variable to a list on the fly, is it possible? I

Re: Process tuple contents on the fly

2013-04-15 Thread Barrett Lewis
d = {} for key, d[key] in ((this,18), (that,17), (other,38)): print key do_something(d) Why not use a dict comprehension? d = {k:v for k,v in ((this,18), (that,17), (other,38))} I feel this is more straightforward and easier to read. the results are the same however. --

Re: Process tuple contents on the fly

2013-04-15 Thread Peter Otten
Tim Chase wrote: On 2013-04-15 11:25, Gnarlodious wrote: Say I have a tuple I want to expand assigning to variables: tup = *func() var = tup[0] lst.append(tup[1]) Or could I do it in one line? var, lst.append() = *func() So I want to append one variable to a list on the fly, is it

Re: Process tuple contents on the fly

2013-04-15 Thread Tim Chase
On 2013-04-15 12:05, Barrett Lewis wrote: d = {} for key, d[key] in ((this,18), (that,17), (other,38)): print key do_something(d) Why not use a dict comprehension? d = {k:v for k,v in ((this,18), (that,17), (other,38))} I feel this is more straightforward and easier to

Re: Making ETL from Access 97 to Access 2003

2013-04-15 Thread Paul Simon
rusi rustompm...@gmail.com wrote in message news:92551c63-1347-4f1a-9dca-d1bbd5e4d...@ys5g2000pbc.googlegroups.com... Its hard to distinguish what you are saying from what I said because you've lost the quotes. On Apr 15, 9:01 pm, Paul Simon psi...@sonic.net wrote: rusi rustompm...@gmail.com

Re: Process tuple contents on the fly

2013-04-15 Thread Barrett Lewis
In the particular case I did it in, I needed the incremental results passed to a function, not just the final result. I don't think this made it into the final code, rather it was expanded to be more readable. But the discovery made me feel a disturbance in the Pythonic force of the

Re: Process tuple contents on the fly

2013-04-15 Thread MRAB
On 15/04/2013 20:05, Barrett Lewis wrote: d = {} for key, d[key] in ((this,18), (that,17), (other,38)): print key do_something(d) Why not use a dict comprehension? d = {k:v for k,v in ((this,18), (that,17), (other,38))} I feel this is more straightforward

Re: Process tuple contents on the fly

2013-04-15 Thread Tobiah
On 04/15/2013 11:25 AM, Gnarlodious wrote: Say I have a tuple I want to expand assigning to variables: tup = *func() What is the asterisk for? I assume it's a python 3 thing, because I get a syntax error, but I'm having trouble Googling it. Thanks, Tobiah --

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Dave Angel
On 04/15/2013 01:43 PM, Antoon Pardon wrote: Op 15-04-13 12:11, Steven D'Aprano schreef: Python's data model has always been 100% object oriented. Prior to the class/type unification, it simply had *two distinct* implementations of objects: types, which were written in C, and classes, which

Re: Process tuple contents on the fly

2013-04-15 Thread Michael Torrie
On 04/15/2013 02:35 PM, Tobiah wrote: On 04/15/2013 11:25 AM, Gnarlodious wrote: Say I have a tuple I want to expand assigning to variables: tup = *func() What is the asterisk for? I assume it's a python 3 thing, because I get a syntax error, but I'm having trouble Googling it. No it's

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Rotwang
On 15/04/2013 22:13, Dave Angel wrote: On 04/15/2013 01:43 PM, Antoon Pardon wrote: [...] I had gotten my hopes up after reading this but then I tried: $ python3 Python 3.2.3 (default, Feb 20 2013, 17:02:41) [GCC 4.7.2] on linux2 Type help, copyright, credits or license for more information.

Re: howto remove the thousand separator

2013-04-15 Thread Rotwang
On 15/04/2013 08:03, Steven D'Aprano wrote: On Mon, 15 Apr 2013 03:19:43 +0100, Rotwang wrote: [...] (Sorry for linking to Google Groups. Does anyone know of a better c.l.p. web archive?) The canonical (although possibly not the best) archive for c.l.p. is the python-list mailing list

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Chris Angelico
On Tue, Apr 16, 2013 at 8:12 AM, Rotwang sg...@hotmail.co.uk wrote: Traceback (most recent call last): File pyshell#2, line 1, in module class C(type(lambda: None)): TypeError: type 'function' is not an acceptable base type and I don't think that FunctionType would be considered an

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Rotwang
On 15/04/2013 23:32, Chris Angelico wrote: On Tue, Apr 16, 2013 at 8:12 AM, Rotwang sg...@hotmail.co.uk wrote: Traceback (most recent call last): File pyshell#2, line 1, in module class C(type(lambda: None)): TypeError: type 'function' is not an acceptable base type and I don't think

Re: Process tuple contents on the fly

2013-04-15 Thread Gnarlodious
On Monday, April 15, 2013 2:35:10 PM UTC-6, Tobiah wrote: tup = *func() What is the asterisk for? I assume it's a python 3 Not Python 3, pseudocode. I should have said as such, sorry. Supposed to indicate an expanded tuple. -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list

Re: Cross-compiling Python for ARM?

2013-04-15 Thread Terry Jan Reedy
On 4/15/2013 11:20 AM, Gilles wrote: Hello I tried running uWSGI on an ARM-based appliance, but it fails. Apparently, it could be due to the official Python 2.6.6 interpreter in the depot not being compiled the way uWSGI expects it to be: ./configure --enable-shared; make; make install;

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Terry Jan Reedy
On 4/15/2013 1:43 PM, Antoon Pardon wrote: $ python3 Python 3.2.3 (default, Feb 20 2013, 17:02:41) [GCC 4.7.2] on linux2 Type help, copyright, credits or license for more information. class vslice (slice): ... pass ... Traceback (most recent call last): File stdin, line 1, in module

Re: Threadpool item mailboxes design problem

2013-04-15 Thread Charles Hixson
On 04/15/2013 10:14 AM, Charles Hixson wrote: On 04/14/2013 07:32 PM, Chris Rebert wrote: On Apr 14, 2013 4:27 PM, Charles Hixson charleshi...@earthlink.net mailto:charleshi...@earthlink.net wrote: What is the best approach to implementing actors that accept and post messages (and have no

Python with Apache

2013-04-15 Thread Renato Barbosa Pim Pereira
I am trying to execute cgi101.py: #!/usr/bin/python import cgi form = cgi.FieldStorage() # parse form data print('Content-type: text/html\n')# hdr plus blank line print('titleReply Page/title')# html reply page if not 'user' in form: print('h1Who are

Re: Python with Apache

2013-04-15 Thread MRAB
On 16/04/2013 03:02, Renato Barbosa Pim Pereira wrote: I am trying to execute cgi101.py: #!/usr/bin/python import cgi form = cgi.FieldStorage() # parse form data print('Content-type: text/html\n')# hdr plus blank line print('titleReply Page/title')# html reply

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Steven D'Aprano
On Mon, 15 Apr 2013 20:52:58 -0400, Terry Jan Reedy wrote: On 4/15/2013 1:43 PM, Antoon Pardon wrote: $ python3 Python 3.2.3 (default, Feb 20 2013, 17:02:41) [GCC 4.7.2] on linux2 Type help, copyright, credits or license for more information. class vslice (slice): ... pass ...

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Steven D'Aprano
On Mon, 15 Apr 2013 19:43:32 +0200, Antoon Pardon wrote: Op 15-04-13 12:11, Steven D'Aprano schreef: Python's data model has always been 100% object oriented. Prior to the class/type unification, it simply had *two distinct* implementations of objects: types, which were written in C, and

Re: Grammar question: Englisn and Python: qualified names

2013-04-15 Thread Cameron Simpson
On 15Apr2013 07:50, Chris Angelico ros...@gmail.com wrote: | Quirky question time! | | When you read out a qualified name, eg collections.OrderedDict, do you | read the qualifier (collections dot ordered dict), or do you elide | it (ordered dict)? I ask because it makes a difference to talking |

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Terry Jan Reedy
On 4/15/2013 10:32 PM, Steven D'Aprano wrote: On Mon, 15 Apr 2013 20:52:58 -0400, Terry Jan Reedy wrote: Some builtin classes cannot be subclassed. There is an issue to document which better. That does not mean that it is not a class. I think it is also important to document whether that

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread Ian Kelly
On Mon, Apr 15, 2013 at 9:17 PM, Terry Jan Reedy tjre...@udel.edu wrote: I will keep the above in mind if I write or review a patch. here are 4 non-subclassable builtin classes. Two are already documented. Bool in one, forget which other. I believe it was recently decided to leave the other two

Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-15 Thread rusi
On Apr 16, 7:32 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: If I had a say in this, I would vote for the first case, with the possible exception of documented singleton types like NoneType and bool. How is bool a singleton type? --

[issue15281] pyvenv --symlinks option is a no-op?

2013-04-15 Thread Vinay Sajip
Vinay Sajip added the comment: In this case couldn't symlinks be automatically used on Windows Vista or newer? It seems simpler if the default behaviour is the same on all Windows flavours - you can specify --symlinks if you're on Windows Vista or later. --

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-15 Thread Larry Hastings
Larry Hastings added the comment: Okay, I got inspired and (in the words of Barry Warsaw) JFDI. Attached is my revised patch. I took Serhiy's patch and reworked it quite a bit: * I think it's now easier to follow. In particular: * The most common case (no overflow) is now first. In

[issue17731] test_iter_importers intermittent failure in test_pkgutil

2013-04-15 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- assignee: - ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17731 ___ ___ Python-bugs-list

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-15 Thread Mark Dickinson
Mark Dickinson added the comment: To answer Serhiy's question: I'd say that this level of cleanup is probably only appropriate for 3.4. Larry? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15301

[issue17713] test_logging fails in test_compute_rollover_weekly_attime

2013-04-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 193e7ad92900 by Vinay Sajip in branch 'default': Issue #17713: Added failure diagnostics to test. http://hg.python.org/cpython/rev/193e7ad92900 -- ___ Python tracker rep...@bugs.python.org

[issue17732] distutils.cfg Can Break venv

2013-04-15 Thread Vinay Sajip
Vinay Sajip added the comment: This looks to me as if it will need a patch in distutils. Unlike virtualenv, which contains a patched copy of distutils (and hence allows having a .cfg adjacent to it), pyvenv does not create patched modules in the venv. It does not make sense to change this

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2013-04-15 Thread Larry Hastings
Larry Hastings added the comment: See my comment above (dated 2013-04-14 04:30). I'm passing the buck. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15301 ___

[issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4

2013-04-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Checked the patch: it fixes the problem. Thanks. Will this go into Python 2.7.5 ? I'm asking because we need to issue a patch level release of egenix-mx-base and if Python 2.7.5 will fix the problem, we'll just add the work-around for Python 2.7.4.

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Maybe I'm misinterpreting what you wrote but the test fails before the patch and succeeds after it so what's the point in adding multiple tests with different timeouts? Also, rathr than using an harcoded delta, we could maybe use a fudger factor, like

[issue17731] test_iter_importers intermittent failure in test_pkgutil

2013-04-15 Thread Nick Coghlan
Nick Coghlan added the comment: spam is a fairly generic name, so I'm guessing something else is leaving a spam module around in sys.modules - when I run the tests with the order given in RDM's original report, I get the same error. I also get a failure in test_builtin though, which is a

[issue17708] sys.flags.hash_randomization doesn't return correct value

2013-04-15 Thread Christian Heimes
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17708 ___ ___

[issue17732] distutils.cfg Can Break venv

2013-04-15 Thread Nick Sloan
Nick Sloan added the comment: That's along the lines of what I've been thinking as I dig into this. I'd love to take a stab at a patch for this if no one else has done so already. -- ___ Python tracker rep...@bugs.python.org

[issue17734] Failure when running test_builtin after test_genexps

2013-04-15 Thread Nick Coghlan
New submission from Nick Coghlan: I'm getting a failure in test_builtin when running the following: ./python -m test -w test_genexps test_builtin == FAIL: test_input_tty_non_ascii (test.test_builtin.BuiltinTest)

[issue17731] test_iter_importers intermittent failure in test_pkgutil

2013-04-15 Thread Nick Coghlan
Nick Coghlan added the comment: Created #17734 for the weird interference between test_genexps and test_builtin -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17731 ___

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-15 Thread Pascal Chambon
Changes by Pascal Chambon chambon.pas...@gmail.com: -- nosy: +Pascal.Chambon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17636 ___ ___

[issue17353] Plistlib outputs empty data tags when deeply nested

2013-04-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: I agree that plistlib shouldn't raise an exception for data that can represented as a valid plist file. I've checked that the Cocoa class for generating plist files will happily create a plist file when the data is nested 100 levels deep. In that case

[issue17353] Plistlib outputs empty data tags when deeply nested

2013-04-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: The attach patch should fix the issue (but there needs to be a unittest as well). -- Added file: http://bugs.python.org/file29863/issue-17353.txt ___ Python tracker rep...@bugs.python.org

[issue17735] inspect.findsource throws IndexError

2013-04-15 Thread Kyle Simpson
New submission from Kyle Simpson: Here is one way to reproduce this bug: 1. Create a module file (bug.py in this example) def func(): pass 2. Run Python import bug help(bug) 3. Edit bug.py def func(): pass def newfunc(): pass 4. Use the same Python interpreter as in step 2

[issue17731] test_iter_importers intermittent failure in test_pkgutil

2013-04-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 73c79022977b by Nick Coghlan in branch '3.3': Close #17731: Clean up properly in test_import http://hg.python.org/cpython/rev/73c79022977b New changeset 5d4001e32a31 by Nick Coghlan in branch 'default': Merge fix for #17731 from 3.3

[issue17736] Misleading method comment in _elementtree.c : get_attrib_from_keywords

2013-04-15 Thread Jonas Wagner
New submission from Jonas Wagner: The attached patch corrects a wrong method comment in _elementtree.c. It happened to be at Line 316, and was thus discovered by random sampling. [1] [1] http://www-cs-faculty.stanford.edu/~uno/316.html -- components: Extension Modules files:

[issue17716] From ... import fails when parent package failed but child module succeeded, yet works in std import case

2013-04-15 Thread Pascal Chambon
Pascal Chambon added the comment: (sorry for the long post, but it's a complex issue I guess) I forgot to precise that I have this behaviour with the latest python2.7, as well as python3.3 (I guess other versions behave the same). I agree that having side effects in script imports looks

[issue17737] test_gdb fails on armv7hl

2013-04-15 Thread Bohuslav Slavek Kabrda
New submission from Bohuslav Slavek Kabrda: Hi, it seems that test_gdb fails on armv7hl on Fedora 19 and 20 [1] (I'm also tracking my notes of the bug there). Basically, the problem seems to come down to PyObjectPtr.subclass_from_type (file python-gdb.py) returning different values for

[issue17708] sys.flags.hash_randomization doesn't return correct value

2013-04-15 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- nosy: +dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17708 ___ ___ Python-bugs-list

[issue17530] pprint could use line continuation for long bytes literals

2013-04-15 Thread Pam McA'Nulty
Pam McA'Nulty added the comment: Here's a patch. I needed to handle the fact that the repr of a single byte can be 1, 2 or 4 characters long and did not want to wrap in the middle of a byte representation. Note also that bytes literals require a continuation character. In the pathological

[issue17530] pprint could use line continuation for long bytes literals

2013-04-15 Thread Pam McA'Nulty
Pam McA'Nulty added the comment: oops, forgot to add some samples: pprint.pprint(b\n\n\n\n\n\n, width=5) b'\n'\ b'\n'\ b'\n'\ b'\n'\ b'\n'\ b'\n' pprint.pprint({a: b\x00\xff * 20}) {'a': b'\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00'\

[issue17728] format() default precisions undocumented

2013-04-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 725d6347ac7e by Eric V. Smith in branch '2.7': Issue #17728: Specify default precision for float.format for presentation types e, f, and g. http://hg.python.org/cpython/rev/725d6347ac7e New changeset ad481c95a1d4 by Eric V. Smith in branch '3.3':

[issue17728] format() default precisions undocumented

2013-04-15 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17728 ___

[issue17737] test_gdb fails on armv7hl

2013-04-15 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17737 ___ ___ Python-bugs-list mailing

[issue17735] inspect.findsource throws IndexError

2013-04-15 Thread R. David Murray
R. David Murray added the comment: Can you explain what makes this one a different problem? It looks like the same one to me. Or is your intent in this issue just to avoid the exception? In that case it seems to me it would better to fix issue 1218234 if we can. -- nosy:

[issue17738] Unnecessary if in SHA1_copy

2013-04-15 Thread Jonas Wagner
New submission from Jonas Wagner: I'm puzzled by the following code in SHA1_copy (at python/Modules/sha1module.c:320 if (Py_TYPE(self) == SHA1type) { if ( (newobj = newSHA1object())==NULL) return NULL; } else { if ( (newobj = newSHA1object())==NULL)

[issue17530] pprint could use line continuation for long bytes literals

2013-04-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't understand why you say that bytes literals require a continuation character: (bx ... by) b'xy' [bx ... by] [b'xy'] I think the len caching is a misoptimization, it's useless here (most CPU time will be sent creating and wrapping the

[issue8876] distutils should not assume that hardlinks will work

2013-04-15 Thread sorin
sorin added the comment: Can we have this merged, it prevents us form using distutil, especially in a continuous integration environment where you do not have control over the build server. See: https://drone.io/github.com/pycontribs/tendo/1 -- nosy: +sorin

[issue17530] pprint could use line continuation for long bytes literals

2013-04-15 Thread Pam McA'Nulty
Pam McA'Nulty added the comment: - eval expects bytes to have a continuation character and test_str_wrap did an eval check so I figured test_bytes_wrap should as well: # repr some bytes: b = b\x00\xff * 5 b b'\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff' r = repr(b) r

[issue8876] distutils should not assume that hardlinks will work

2013-04-15 Thread Éric Araujo
Éric Araujo added the comment: I’ll get this in the next bugfix releases. -- keywords: -needs review nosy: +benjamin.peterson, georg.brandl, larry priority: normal - release blocker versions: +Python 3.4 -Python 3.2 ___ Python tracker

[issue17707] Multiprocessing queue get method does not block for short timeouts

2013-04-15 Thread Charles-François Natali
Charles-François Natali added the comment: Maybe I'm misinterpreting what you wrote but the test fails before the patch and succeeds after it so what's the point in adding multiple tests with different timeouts? Well, the test you added tests explicitely for a value 1s because this

[issue17530] pprint could use line continuation for long bytes literals

2013-04-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, but eval works if you put parentheses as required by the grammar: s = (b'xy'\nb'za') eval(s) b'xyza' Yes, _str_parts and _bytes_parts should probably remain separate. It's the higher-level routine that would deserve sharing. Also, perhaps the other

[issue17739] ssl.SSLSocket.getpeercert does not return client certificate

2013-04-15 Thread David D Lowe
New submission from David D Lowe: The documentation for ssl.SSLSocket.getpeercert states: If the binary_form parameter is True, and a certificate was provided, this method returns the DER-encoded form of the entire certificate as a sequence of bytes, or None if the peer did not provide a

[issue17673] add `copy_from` argument to temporaryfile

2013-04-15 Thread Kyle Roberts
Kyle Roberts added the comment: I think `copy_from` should be included for mkstemp as well. It provides similar functionality to TemporaryFile and NamedTemporaryFile, but it doesn't delete the temp file on close as the other two do by default. Thoughts? --

[issue17734] Failure when running test_builtin after test_genexps

2013-04-15 Thread Ezio Melotti
Ezio Melotti added the comment: Isn't this the same as #13886? -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17734 ___ ___

[issue13510] Clarify that readlines() is not needed to iterate over a file

2013-04-15 Thread Dan Riti
Dan Riti added the comment: Agreed Ezio, I've updated the patch to include the change to Doc/library/io.rst:readlines. -- Added file: http://bugs.python.org/file29868/demote-readlines-v3.patch ___ Python tracker rep...@bugs.python.org

[issue16694] Add pure Python operator module

2013-04-15 Thread Zachary Ware
Zachary Ware added the comment: Here's another new version of the patch, addressing Ezio's review comments and a few things I found after giving operator.py a closer look myself. Things changed in operator.py in this version: - all ``__func__ = func`` assignments are moved to the end, after

[issue16694] Add pure Python operator module

2013-04-15 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- nosy: -Arfrever, brett.cannon, eric.araujo, ezio.melotti, jcea, meador.inge, pitrou, serhiy.storchaka, zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694

[issue16694] Add pure Python operator module

2013-04-15 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file28327/operator.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___

[issue16694] Add pure Python operator module

2013-04-15 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file28328/py_operator.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___

[issue16694] Add pure Python operator module

2013-04-15 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file28374/py_operator.v3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___

[issue16694] Add pure Python operator module

2013-04-15 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file28388/py_operator.v5.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___

  1   2   >