Re: Dihedral

2013-07-16 Thread Tim Delaney
On 16 July 2013 08:59, Chris Angelico ros...@gmail.com wrote: On Tue, Jul 16, 2013 at 8:54 AM, Fábio Santos fabiosantos...@gmail.com wrote: On 07/15/2013 08:36 AM, Steven D'Aprano wrote: Devyn, 8 Dihedral is our resident bot, not a human being. Nobody knows who controls it,

How to build python with shared libraries.

2013-07-16 Thread guxiaobo1982
Hi, I am not so familiar with Python, I just want to use the multicorn external data wrapper and plpythonu2 language with PostgreSQL, my question is which option to specify when build Python 3.3 with shared libraries from source. Regards, Xiaobo Gu--

grimace: a fluent regular expression generator in Python

2013-07-16 Thread Ben Last
Hi all I'd be interested in comments on a fluent regular expression generator I've been playing with (inspired by the frustrations of a friend of mine who's learning). The general use case is to be able to construct RE strings such as: r'^\(\d{3,3}\)-{1,1}\d{3,3}\-{1,1}\d{4,4}$' (intended to

Re: Bluetooth Sockets

2013-07-16 Thread Simfake Fake
Just bumping this, but has anybody have any personal experience with bluetooth in python 3? Perhaps my issue is that the windows version doesn't include it? On Sat, Jul 13, 2013 at 6:23 PM, Simfake Fake simfake.mapp...@gmail.comwrote: Hi. I'm trying to connect to a bluetooth serial adaptor

help on python regular expression named group

2013-07-16 Thread Mohan L
Dear All, Here is my script : #!/usr/bin/python import re # A string. logs = date=2012-11-28 time=21:14:59 # Match with named groups. m = re.match((?Pdatetime(date=(?Pdate[^\s]+))\s+(time=(?Ptime[^\s]+))), logs) # print print m.groupdict() Output: {'date': '2012-11-28', 'datetime':

Re: Bluetooth Sockets

2013-07-16 Thread Chris Angelico
On Tue, Jul 16, 2013 at 3:52 PM, Simfake Fake simfake.mapp...@gmail.com wrote: Just bumping this, but has anybody have any personal experience with bluetooth in python 3? Perhaps my issue is that the windows version doesn't include it? I haven't worked with Bluetooth in Python, but my reading

Re: a little more explicative error message?

2013-07-16 Thread Terry Reedy
On 7/16/2013 1:44 AM, Vito De Tullio wrote: Hi I was writing a decorator and lost half an hour for a stupid bug in my code, but honestly the error the python interpreter returned to me doesn't helped... $ python3 Python 3.3.0 (default, Feb 24 2013, 09:34:27) [GCC 4.7.2] on linux Type help,

Re: grimace: a fluent regular expression generator in Python

2013-07-16 Thread Joshua Landau
On 15 July 2013 23:21, Ben Last benl...@gmail.com wrote: Hi all I'd be interested in comments on a fluent regular expression generator I've been playing with (inspired by the frustrations of a friend of mine who's learning). The general use case is to be able to construct RE strings such

Re: help on python regular expression named group

2013-07-16 Thread Joshua Landau
On 16 July 2013 07:55, Mohan L l.mohan...@gmail.com wrote: Dear All, Here is my script : #!/usr/bin/python import re # A string. logs = date=2012-11-28 time=21:14:59 # Match with named groups. m = re.match((?Pdatetime(date=(?Pdate[^\s]+))\s+(time=(?Ptime[^\s]+))), logs) # print

Re: Understanding other people's code

2013-07-16 Thread Jean-Michel Pichavant
- Original Message - Thanks for all the suggestions, I'm afraid I didn't get a chance to view them over the weekend but I will get started with them this morning. I'm currently using sublime 2 for my text editor and tried to create a UML diagram using Pylint to try and get a map

Re: Bluetooth Sockets

2013-07-16 Thread Christian Heimes
Am 13.07.2013 10:53, schrieb Simfake Fake: Hi. I'm trying to connect to a bluetooth serial adaptor using python 3.x. However, in python 3.3.2 win x32, I get AttributeError: module has no attribute AF_... when trying to use socket.AF_BLUETOOTH, despite the docs

Re: RE Module Performance

2013-07-16 Thread Devyn Collier Johnson
Am 07/12/2013 07:16 PM, schrieb MRAB: On 12/07/2013 23:16, Tim Delaney wrote: On 13 July 2013 03:58, Devyn Collier Johnson devyncjohn...@gmail.com mailto:devyncjohn...@gmail.com wrote: Thanks for the thorough response. I learned a lot. You should write articles on Python. I plan

Floating point minimum and maximum exponent values

2013-07-16 Thread Marco
Hi all, why the maximum and minimum exp values are 1024 and -1021?: sys.float_info sys.float_info(max=1.7976931348623157e+308, max_exp=1024, max_10_exp=308, min=2.2250738585072014e-308, min_exp=-1021, min_10_exp=-307, dig=15, mant_dig=53, epsilon=2.220446049250313e-16, radix=2, rounds=1)

Re: Floating point minimum and maximum exponent values

2013-07-16 Thread Chris Angelico
On Tue, Jul 16, 2013 at 9:43 PM, Marco m...@gmail.com wrote: Hi all, why the maximum and minimum exp values are 1024 and -1021?: sys.float_info sys.float_info(max=1.7976931348623157e+308, max_exp=1024, max_10_exp=308, min=2.2250738585072014e-308, min_exp=-1021, min_10_exp=-307, dig=15,

ANN: eGenix EuroPython 2013 Talks Videos

2013-07-16 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix EuroPython 2013 Talks Videos This announcement is also available on our web-site for online reading: http://www.egenix.com/company/news/EuroPython-2013-Presentations.html

Re: Floating point minimum and maximum exponent values

2013-07-16 Thread Christian Heimes
Am 16.07.2013 14:04, schrieb Chris Angelico: Piece of extreme oddity, this. help(sys.float_info) lots of other info ... | max_exp | DBL_MAX_EXP -- maximum int e such that radix**(e-1) is representable | | min_exp | DBL_MIN_EXP -- minimum int e such that radix**(e-1)

Re: help on python regular expression named group

2013-07-16 Thread Mohan L
On Tue, Jul 16, 2013 at 2:12 PM, Joshua Landau jos...@landau.ws wrote: On 16 July 2013 07:55, Mohan L l.mohan...@gmail.com wrote: Dear All, Here is my script : #!/usr/bin/python import re # A string. logs = date=2012-11-28 time=21:14:59 # Match with named groups. m =

Re: grimace: a fluent regular expression generator in Python

2013-07-16 Thread Anders J. Munch
Ben Last wrote: north_american_number_re = (RE().start .literal('(').followed_by.exactly(3).digits.then.literal(')') .then.one.literal(-).then.exactly(3).digits .then.one.dash.followed_by.exactly(4).digits.then.end

Re: Is this a bug?

2013-07-16 Thread Jack Bates
On 15/07/13 09:13 AM, Joshua Landau wrote: On 15 July 2013 16:50, Jack Bates tdh...@nottheoilrig.com wrote: Hello, Is the following code supposed to be an UnboundLocalError? Currently it assigns the value 'bar' to the attribute baz.foo foo = 'bar' class baz: foo = foo If so,

Re: help on python regular expression named group

2013-07-16 Thread MRAB
On 16/07/2013 11:18, Mohan L wrote: On Tue, Jul 16, 2013 at 2:12 PM, Joshua Landau jos...@landau.ws mailto:jos...@landau.ws wrote: On 16 July 2013 07:55, Mohan L l.mohan...@gmail.com mailto:l.mohan...@gmail.com wrote: Dear All, Here is my script :

Re: help on python regular expression named group

2013-07-16 Thread Joshua Landau
On 16 July 2013 16:38, MRAB pyt...@mrabarnett.plus.com wrote: On 16/07/2013 11:18, Mohan L wrote: I using another third party python script. It takes the regex from configuration file. I can't write any code. I have to do all this in single regex. A capture group captures a single

Re: Floating point minimum and maximum exponent values

2013-07-16 Thread Serhiy Storchaka
16.07.13 15:04, Chris Angelico написав(ла): Piece of extreme oddity, this. help(sys.float_info) ... lots of other info ... | max_exp | DBL_MAX_EXP -- maximum int e such that radix**(e-1) is representable | | min_exp | DBL_MIN_EXP -- minimum int e such that radix**(e-1)

Help with pygame

2013-07-16 Thread Daniel Kersgaard
I'm having a little trouble, tried Googling it, but to no avail. Currently, I'm working on making a snake game, however I'm stuck on a simple border. The only thing I need help with is when you run the program, the bottom right corner of the border is missing. I'm not sure why. And I know I'm

Re: Is this a bug?

2013-07-16 Thread Ian Kelly
On Tue, Jul 16, 2013 at 9:25 AM, Jack Bates tdh...@nottheoilrig.com wrote: Ah, thank you Chris Angelico for explaining how this is like what happens with default arguments to a function and Joshua Landau for pointing out how assignments inside class bodies refer to properties of self on the

Re: Help with pygame

2013-07-16 Thread Chris Angelico
On Wed, Jul 17, 2013 at 3:29 AM, Daniel Kersgaard danielkersga...@gmail.com wrote: def drawWalls(surface): #left and right walls for y in range(HEIGHT): surface.blit(wallblock, (0, y * BLOCK_SIZE)) surface.blit(wallblock, (WIDTH * BLOCK_SIZE, y * BLOCK_SIZE))

Re: Help with pygame

2013-07-16 Thread Daniel Kersgaard
I didn't even think about that! I added one more draw and it worked like a charm, thanks so much! I'm not sure why I couldn't think of that! -- http://mail.python.org/mailman/listinfo/python-list

Re: Understanding other people's code

2013-07-16 Thread David M Chess
Literally any idea will help, pen and paper, printing off all the code and doing some sort of highlighting session - anything! I keep reading bits of code and thinking well where the hell has that been defined and what does it mean to find it was inherited from 3 modules up the chain. I

Re: Help with pygame

2013-07-16 Thread Dave Angel
On 07/16/2013 01:29 PM, Daniel Kersgaard wrote: I'm having a little trouble, tried Googling it, but to no avail. Currently, I'm working on making a snake game, however I'm stuck on a simple border. The only thing I need help with is when you run the program, the bottom right corner of the

Re: GeoIP2 for retrieving city and region ?

2013-07-16 Thread Νικόλας
Στις 14/7/2013 1:57 πμ, ο/η Michael Torrie έγραψε: On 07/13/2013 12:23 PM, Νικόλας wrote: Do you know a way of implementing anyone of these methods to a script? Yes. Modern browsers all support a location API in the browser for javascript. See this:

Re: GeoIP2 for retrieving city and region ?

2013-07-16 Thread Joel Goldstick
On Tue, Jul 16, 2013 at 3:43 PM, Νικόλας ni...@superhost.gr wrote: Στις 14/7/2013 1:57 πμ, ο/η Michael Torrie έγραψε: On 07/13/2013 12:23 PM, Νικόλας wrote: Do you know a way of implementing anyone of these methods to a script? Yes. Modern browsers all support a location API in the

Homework help requested (not what you think!)

2013-07-16 Thread John Ladasky
Hi folks, No, I'm not asking for YOU to help ME with a Python homework assignment! Previously, I mentioned that I was starting to teach my son Python. https://groups.google.com/d/msg/comp.lang.python/I7spp6iC3tw/8lxUXfrL-9gJ He just took a course at his high school called Web Technology and

Re: Is this a bug?

2013-07-16 Thread Terry Reedy
On 7/16/2013 2:04 PM, Ian Kelly wrote: The documentation appears to be wrong. It says: If a name binding operation occurs anywhere within a code block, all uses of the name within the block are treated as references to the current block. This can lead to errors when a name is used within a

Re: Homework help requested (not what you think!)

2013-07-16 Thread David Hutto
You have to utilize a set curriculum to teach. Look at several books like Dive Into Python, and such, then work with the student on an individualized project for each one. For 3D you go with pygame and trig, or go with Blender's python API or matplotlib. Just at first show the basic types of

Re: Understanding other people's code

2013-07-16 Thread David Hutto
Any program, to me, is just like speaking english. The class, or function name might not fully mesh with what your cognitive structure assumes it to be.read through the imports first, and see the classes and functions come alive with experience comes intuition of what it does, and the instances

Re: GeoIP2 for retrieving city and region ?

2013-07-16 Thread alex23
On 16/07/2013 12:48 PM, Michael Torrie wrote: I've posted a link to detailed information on this no less than three times, yet Nikos has not read any of it, sadly. Just a quick reminder for everyone: Ferrous Cranus is utterly impervious to reason, persuasion and new ideas, and when engaged

Re: Help with pygame

2013-07-16 Thread Terry Reedy
On 7/16/2013 1:29 PM, Daniel Kersgaard wrote: I'm having a little trouble, tried Googling it, but to no avail. Currently, I'm working on making a snake game, however I'm stuck on a simple border. To give a variation of the other answers, it would be easier if you drew the four sides more

Re: Homework help requested (not what you think!)

2013-07-16 Thread Chris Angelico
On Wed, Jul 17, 2013 at 8:43 AM, John Ladasky john_lada...@sbcglobal.net wrote: I think that they're disappointed when I show them how much they have to understand just to write a program that plays Tic Tac Toe. The disillusionment of every novice programmer, I think. It starts out as I want

Re: Homework help requested (not what you think!)

2013-07-16 Thread Joel Goldstick
On Tue, Jul 16, 2013 at 8:40 PM, Chris Angelico ros...@gmail.com wrote: On Wed, Jul 17, 2013 at 8:43 AM, John Ladasky john_lada...@sbcglobal.net wrote: I think that they're disappointed when I show them how much they have to understand just to write a program that plays Tic Tac Toe. The

Re: GeoIP2 for retrieving city and region ?

2013-07-16 Thread Chris Angelico
On Wed, Jul 17, 2013 at 10:51 AM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Tue, 16 Jul 2013 22:43:35 +0300, ??? ni...@superhost.gr declaimed the following: Lest say i embed inside my index.html the Javascript Geo Code. Is there a way to pass Javascript's outcome to my Python cgi

tkinter redraw rates

2013-07-16 Thread fronagzen
Hm. So I've written a GUI in tkinter. I've found two performance issues, I was hoping someone could point me in the right direction. Firstly, I'm using an image as a border, namely: from tkinter import * from tkinter import ttk root_frame = Tk() root_frame.configure(background = 'black') img1

Re: tkinter redraw rates

2013-07-16 Thread David Hutto
I've had a similar problem with a tkinter/3D app. right now I'm looking toward Blender, and the Python API, but there is also wxpython, and the usual python's library gtk. There is also matplotlib with the ion window. but, I, personally, am going to go with Blender, and Python API, with maybe a

Re: Homework help requested (not what you think!)

2013-07-16 Thread Chris Angelico
On Wed, Jul 17, 2013 at 10:53 AM, Joel Goldstick joel.goldst...@gmail.com wrote: There is a book : http://inventwithpython.com/ Invent Your Own Computer Games with Python which claims to teach people to program games in python. I haven't read it, but it seems to be for beginning programmers.

Re: tkinter redraw rates

2013-07-16 Thread David Hutto
On Tue, Jul 16, 2013 at 9:32 PM, David Hutto dwightdhu...@gmail.com wrote: I've had a similar problem with a tkinter/3D app. right now I'm looking toward Blender, and the Python API, but there is also wxpython, and the usual python's library gtk. There is also matplotlib with the ion window.

Re: tkinter redraw rates

2013-07-16 Thread Dave Angel
On 07/16/2013 08:57 PM, fronag...@gmail.com wrote: Hm. So I've written a GUI in tkinter. I've found two performance issues, I was hoping someone could point me in the right direction. Firstly, I'm using an image as a border, namely: SNIP This works, yes, but is annoyingly laggy on an

Re: tkinter redraw rates

2013-07-16 Thread fronagzen
On Wednesday, July 17, 2013 9:40:15 AM UTC+8, Dave Angel wrote: On 07/16/2013 08:57 PM, fronag...@gmail.com wrote: Hm. So I've written a GUI in tkinter. I've found two performance issues, I was hoping someone could point me in the right direction. Firstly, I'm using an image as a

Re: tkinter redraw rates

2013-07-16 Thread Dave Angel
On 07/16/2013 09:51 PM, fronag...@gmail.com wrote: If you are going to use googlegroups, then at least bypass its worst bugs, like double-spacing everything it quotes. http://wiki.python.org/moin/GoogleGroupsPython Yeah, I understand that tkinter isn't really designed for 'logic is

Re: tkinter redraw rates

2013-07-16 Thread fronagzen
Noted on the quoting thing. Regarding the threading, well, first, I'm not so much a programmer as someone who knows a bit of how to program. And it seems that the only way to update a tkinter window is to use the .update() method, which is what I was experimenting with. Start up a new thread

[issue18444] IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive.

2013-07-16 Thread Ronald Oussoren
Ronald Oussoren added the comment: Raymond: good to hear that using fn+F5 is not a problem for new users -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18444 ___

[issue18393] Gestalt() is deprecated on OSX 10.8, remove support?

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7272ef213b7c by Ronald Oussoren in branch 'default': Also remove a (broken) leaker test for the code removed in issue #18393. http://hg.python.org/cpython/rev/7272ef213b7c -- ___ Python tracker

[issue9033] cmd module tab misbehavior

2013-07-16 Thread Ronald Oussoren
Ronald Oussoren added the comment: I no longer particularly like my patch, although something needs to be done. The easiest way forward is likely a (private) helper function in the readline module that can translate simple readline configuration strings to something that libedit understands

[issue18211] -Werror=statement-after-declaration problem

2013-07-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18211 ___ ___ Python-bugs-list

[issue18211] -Werror=statement-after-declaration problem

2013-07-16 Thread STINNER Victor
STINNER Victor added the comment: By the way, I don't think that Python should pass the optimization level (-O0 or -O3) to extensions, except for builtin extensions (of the stdlib). -- ___ Python tracker rep...@bugs.python.org

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Nick Coghlan
New submission from Nick Coghlan: A home for a couple of proposed PEP 8 updates (as per the thread starting at http://mail.python.org/pipermail/python-dev/2013-July/127284.html) -- messages: 193159 nosy: ncoghlan priority: normal severity: normal status: open title: PEP 8 updates -

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2013-07-16 Thread Mikhail Korobov
New submission from Mikhail Korobov: I think REVERSE_IMPORT_MAPPING is wrong (see http://hg.python.org/cpython/file/7272ef213b7c/Lib/_compat_pickle.py#l80 ). It relies on dictionary items order and maps 'collections' module to either UserString or UserList. This makes it impossible to

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2013-07-16 Thread Mikhail Korobov
Mikhail Korobov added the comment: my copy-paste went wrong, last statement in the example should be pickle.dumps(dct, protocol=1, fix_imports=False) b'ccollections\ndefaultdict\nq\x00)Rq\x01.' -- ___ Python tracker rep...@bugs.python.org

[issue18448] Tools/demo/eiffel.py fails to run tests.

2013-07-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- type: - behavior versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18448 ___

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Nick Coghlan
Nick Coghlan added the comment: Attached diff has 5 changes: * Explicit note that this is a living document that evolves over time * Adds another explicit reason for not complying with the style guide (i.e. the code is old but still works and there's no other reason to change it) * Fixed

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Nick Coghlan
Nick Coghlan added the comment: Thomas Wouters made a couple of good points regarding absolute vs explicit relative imports, so I've improved the rationale in the PEP accordingly. -- Added file: http://bugs.python.org/file30937/issue18472_pep_8_update2.diff

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Nick Coghlan
Nick Coghlan added the comment: Tweaked the wording in the introduction to cover removal of obsolete conventions along with adding new ones. -- Added file: http://bugs.python.org/file30938/issue18472_pep_8_update3.diff ___ Python tracker

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2013-07-16 Thread Aaron Iles
Aaron Iles added the comment: My +1 is for the callback based approach. The brevity of the search loop for finding the innermost function is (in my opinion at least) non-obvious, relying on for loops not having their own scope as it does. If a generator based API was adopted instead, I

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18472 ___ ___ Python-bugs-list mailing

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread James Lu
New submission from James Lu: if you assign a lambda to a object and call it,you get this: Traceback (most recent call last): File pyshell#21, line 1, in module n.__div__(3) TypeError: lambda() takes exactly 2 arguments (1 given) The full test is here: n = num() n.__div__ function lambda

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread James Lu
Changes by James Lu jam...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18474 ___ ___ Python-bugs-list mailing

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread Brett Cannon
Brett Cannon added the comment: What version of Python is this and did you assign the lambda to an instance or class (and if this is Python 2, new-style or classic class)? -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread James Lu
James Lu added the comment: 2.5,new-style -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18474 ___ ___ Python-bugs-list mailing list

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread James Lu
James Lu added the comment: instance,assinged during __init__ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18474 ___ ___ Python-bugs-list

[issue18475] No unittest.main in Lib/test/test_email/test_inversion.py

2013-07-16 Thread Vajrasky Kok
New submission from Vajrasky Kok: There is no unittest.main in Lib/test/test_email/test_inversion.py. In other word, you can not execute the test by doing something like this: [abcdef@localhost cpython]$ ./python Lib/test/test_email/test_inversion.py Attached the menial fix. --

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread James Lu
James Lu added the comment: Also,there were some bugs, but after I fixed them, it would only work if I did this: n.__div__(n,3) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18474 ___

[issue18476] No way to pass custom arguments for loggers and formatters.

2013-07-16 Thread Piotr Dobrogost
New submission from Piotr Dobrogost: It seems there's no way to pass custom arguments for loggers (http://hg.python.org/cpython/file/d9893d13c628/Lib/logging/__init__.py#l) and formatters (http://hg.python.org/cpython/file/d9893d13c628/Lib/logging/config.py#l117) the same way they are

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: Could you provide an entire example, showing the class num and how you assign __div__? -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18474

[issue17778] Fix test discovery for test_multiprocessing.py

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8a922b28b97d by Richard Oudkerk in branch '3.3': Issue #17778: Fix test discovery for test_multiprocessing. (Patch by http://hg.python.org/cpython/rev/8a922b28b97d New changeset c704735487ae by Richard Oudkerk in branch 'default': Issue #17778: Fix

[issue18474] Lambda assigned to object does not automatically get self

2013-07-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This is expected. When you assign to n.__div__ a function which takes two parameters, you have to call it with two parameters: aFunction = lambda x, y: (x, y) n.__div__ = aFunction aFunction(1, 2) n.__div__(1, 2) After all, aFunction and

[issue18476] No way to pass custom arguments for loggers and formatters.

2013-07-16 Thread Vinay Sajip
Vinay Sajip added the comment: I would prefer not to extend the functionality of fileConfig(), as dictConfig() is the preferred configuration approach. It's much more general than fileConfig() can be (without doing significant work on fileConfig(), which I'd like to not develop any further).

[issue18475] No unittest.main in Lib/test/test_email/test_inversion.py

2013-07-16 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18475 ___ ___ Python-bugs-list mailing

[issue17778] Fix test discovery for test_multiprocessing.py

2013-07-16 Thread Richard Oudkerk
Richard Oudkerk added the comment: Thanks for the patches! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17778

[issue18475] No unittest.main in Lib/test/test_email/test_inversion.py

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset b92db0aebc42 by R David Murray in branch '3.3': Closes #18475: add unittest.main() to test_email/test_inversions. http://hg.python.org/cpython/rev/b92db0aebc42 New changeset 48f27b745519 by R David Murray in branch 'default': Merge: Closes #18475:

[issue18448] Tools/demo/eiffel.py fails to run tests.

2013-07-16 Thread Févry Thibault
Févry Thibault added the comment: One more update. When it fails, it sometimes fails with : == ERROR: testEiffelMetaClass1 (__main__.Tests) -- Traceback (most

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2013-07-16 Thread Yury V. Zaytsev
Yury V. Zaytsev added the comment: NumPy no longer uses the Trac for issues, the tracking has been moved to GitHub. I hope that the problem will be finally solved in NumPy by https://github.com/numpy/numpy/pull/3526 . -- nosy: +zaytsev ___ Python

[issue2263] struct.pack() + numpy int raises SystemError

2013-07-16 Thread Yury V. Zaytsev
Yury V. Zaytsev added the comment: As noted in issue5476, I've submitted a pull request for NumPy: ttps://github.com/numpy/numpy/pull/3526 . I hope that this fixes this problem too: on Py2, I've added Py_TPFLAGS_INT_SUBCLASS, on Py3, NumPy doesn't inherit from int anymore, because it's not a

[issue18211] -Werror=statement-after-declaration problem

2013-07-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: Why not? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18211 ___ ___ Python-bugs-list mailing list

[issue17214] http.client.HTTPConnection.putrequest encode error

2013-07-16 Thread LDTech
LDTech added the comment: This problem still exist in Python 3.3.2. The following code gives you an example: import urllib.request url = http://www.libon.it/libon/search/isbn/3499155443; req = urllib.request.Request(url) response = urllib.request.urlopen(req, timeout=30) the_page =

[issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts

2013-07-16 Thread paul j3
paul j3 added the comment: This patch produces the same usage as before, but I have rewritten _format_actions_usage() for both HelpFormatter and MultiGroupFormater. The original HelpFormatter._format_actions_usage() formats the actions, splices in group markings, cleans up the text, if

[issue18457] Fix and cleanup the ss1.py demo

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9098a4ad4d3e by Serhiy Storchaka in branch '3.3': Issue #18457: Fixed saving of formulas and complex numbers in Tools/demo/ss1.py. http://hg.python.org/cpython/rev/9098a4ad4d3e New changeset c6b91d894577 by Serhiy Storchaka in branch 'default':

[issue18448] Tools/demo/eiffel.py fails to run tests.

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset a9f7c2d49149 by Serhiy Storchaka in branch '2.7': Issue #18448: Fix a typo in Demo/newmetaclasses/Eiffel.py. http://hg.python.org/cpython/rev/a9f7c2d49149 New changeset 6e8ad6071100 by Serhiy Storchaka in branch '3.3': Issue #18448: Fix a typo in

[issue18448] Tools/demo/eiffel.py fails to run tests.

2013-07-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18448

[issue18448] Tools/demo/eiffel.py fails to run tests.

2013-07-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18448 ___ ___

[issue18457] Fix and cleanup the ss1.py demo

2013-07-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18457

[issue11874] argparse assertion failure with brackets in metavars

2013-07-16 Thread paul j3
paul j3 added the comment: Here's a patch that takes a different approach - rewrite _format_actions_usage() so it formats groups (and unattached actions) directly. It uses the same logic to determine when to format a group, but then it calls _format_group_usage() to format the group,

[issue18349] argparse usage should preserve () in metavars such as range(20)

2013-07-16 Thread paul j3
paul j3 added the comment: I just submitted at patch to http://bugs.python.org/issue11874 that takes care of this issue as well. I rewrote _format_actions_usage() so it formats the parts directly, so there is no need cleanup or parse the full text string. --

[issue16468] argparse only supports iterable choices

2013-07-16 Thread paul j3
paul j3 added the comment: I just submitted a patch to http://bugs.python.org/issue11874 which rewrites _format_actions_usage(). It now formats the groups and actions directly, keeping a list of these parts. It no longer has to cleanup or split a usage line into parts. So it is not

[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2013-07-16 Thread p0lar_bear
p0lar_bear added the comment: I get similar results if my CGI script sends a Content-Type header of anything besides text/html, e.g. print('Content-Type: text/json'). -- nosy: +p0lar_bear ___ Python tracker rep...@bugs.python.org

[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2013-07-16 Thread p0lar_bear
Changes by p0lar_bear t3hp0larb...@gmail.com: -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8704 ___ ___ Python-bugs-list

[issue17890] argparse: mutually exclusive groups full of suppressed args can cause AssertionErrors

2013-07-16 Thread paul j3
paul j3 added the comment: I just submitted a patch to http://bugs.python.org/issue11874 that substantially rewrites _format_actions_usage(). It generates the group and action parts separately, and does not do the kind of cleanup that produces this issue. --

[issue18408] Fixes crashes found by pyfailmalloc

2013-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 533eb9ab895a by Victor Stinner in branch 'default': Issue #18408: Fix fileio_read() on _PyBytes_Resize() failure http://hg.python.org/cpython/rev/533eb9ab895a New changeset f0efd7ea1627 by Victor Stinner in branch 'default': Issue #18408: Fix

[issue18477] fix_import (2to3 fixer) is not case-sensitive

2013-07-16 Thread ProgVal
New submission from ProgVal: In a project, I have a package with a module named Socket.py, and the __init__.py imports the socket module (from the standard Python lib). However, when fix_import went over it _on Windows_, it converted import socket to from . import Socket. I also had this issue

[issue18477] fix_import (2to3 fixer) is not case-sensitive

2013-07-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18477 ___ ___

[issue18467] argparse - problematic 'default' behavior

2013-07-16 Thread paul j3
Changes by paul j3 ajipa...@gmail.com: -- nosy: +paul.j3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18467 ___ ___ Python-bugs-list mailing list

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18472 ___ ___ Python-bugs-list

[issue18036] How do I create a .pyc file? FAQ entry is out of date

2013-07-16 Thread A Kaptur
A Kaptur added the comment: Here is a suggestion for updated documentation in this section. I've added the description of __pycache__, included a very short description of what a .pyc file is, and moved the troubleshooting to the end of the section. I'm not sure whether the description (a

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Is the scope of this issue just what is in the title, the whole PEP, or something in between;-? For instance, Guido once approved (on pydev) adding an admonition to Programming Recommendations something like the following. * Use a def statement instead of an

  1   2   >