Re: Append to python List

2013-05-12 Thread Jussi Piitulainen
Chris Angelico writes: On Thu, May 9, 2013 at 9:30 PM, Jussi Piitulainen wrote: 8 Dihedral writes: This is just the handy style for a non-critical loop. In a critical loop, the number of the total operation counts does matter in the execution speed. Do you use speed often?

Re: Python for philosophers

2013-05-12 Thread Devin Jeanpierre
On Sun, May 12, 2013 at 1:17 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 11 May 2013 21:45:12 -0700, rusi wrote: I have on occasion expressed that newcomers to this list should be treated with more gentleness than others. And since my own joking may be taken amiss,

Old version docs don't link to current version

2013-05-12 Thread Chris Angelico
Not sure if this is an oversight or something deliberate... could be either. From http://docs.python.org/3.0/library/http.server.html there's no link to the current docs, even though from http://docs.python.org/3/library/http.server.html it's possible to switch to 3.2 and then back to 3.3 (or to

Re: Python for philosophers

2013-05-12 Thread Citizen Kant
Thank you very much for your answers. I'm afraid that, at this stage, I must prevent myself from knowing too much about the subject. My idea here is trying to fill the gaps, mostly, using intuition. What I do here is to try to understand. That's different from just knowing. Knowledge growth must

Re: Python for philosophers

2013-05-12 Thread Steven D'Aprano
On Sun, 12 May 2013 16:17:02 +0200, Citizen Kant wrote: Any clue about this would be highly appreciated. If you are interested in the intersection of programming and philosophy, I strongly recommend that you read Gödel, Escher, Bach: An Eternal Golden Braid by Douglas R. Hofstadter. --

Re: Python for philosophers

2013-05-12 Thread Steven D'Aprano
On Sun, 12 May 2013 04:15:30 -0400, Devin Jeanpierre wrote: On Sun, May 12, 2013 at 1:17 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 11 May 2013 21:45:12 -0700, rusi wrote: I have on occasion expressed that newcomers to this list should be treated with more

Re: Python for philosophers

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 12:17 AM, Citizen Kant citizenk...@gmail.com wrote: Maybe It'd be good if I explain myself a bit more. What I'm trying here is to grasp Python from the game's abstraction point of view, as if it were, for example, chess. Maybe you're going for something a little too

Re: in need of some help...

2013-05-12 Thread Chris “Kwpolska” Warrick
(slightly offtopic, sorry.) On Sun, May 12, 2013 at 12:20 AM, Jens Thoms Toerring j...@toerring.de wrote: PS: If I may ask you a favor: consider refraining from using Google's completely broken interface to newsgroups - your post consists of nearly 200 lines of text containing all I

Re: Python for philosophers

2013-05-12 Thread rusi
On May 12, 7:17 pm, Citizen Kant citizenk...@gmail.com wrote: Maybe It'd be good if I explain myself a bit more. What I'm trying here is to grasp Python from the game's abstraction point of view, as if it were, for example, chess. That's why I need a real_player to point me to: (so to speak, I

Re: in need of some help...

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 1:59 AM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: On Sun, May 12, 2013 at 12:20 AM, Jens Thoms Toerring j...@toerring.de wrote: PS: If I may ask you a favor: consider refraining from using Google's completely broken interface to newsgroups - your post

Re: object.enable() anti-pattern

2013-05-12 Thread Wayne Werner
On Fri, 10 May 2013, Robert Kern wrote: On 2013-05-10 12:00, Steven D'Aprano wrote: But either way, that's fine. You've found an object where it does make sense to have an explicit make it go method: first one entity has permission to construct the object, but not to open the underlying file.

Re: object.enable() anti-pattern

2013-05-12 Thread Wayne Werner
On Fri, 10 May 2013, Gregory Ewing wrote: Wayne Werner wrote: You don't ever want a class that has functions that need to be called in a certain order to *not* crash. That seems like an overly broad statement. What do you think the following should do? f = open(myfile.dat) f.close()

Re: Message passing syntax for objects | OOPv2

2013-05-12 Thread Ned Batchelder
On 5/8/2013 10:39 PM, Mark Janssen wrote: ...The field needs re-invented and re-centered.[...] For anyone who want to be involved. See the wikiwikiweb -- a tool that every programmer should know and use -- and these pages: ComputerScienceVersionTwo and ObjectOrientedRefactored. I've never

Re: Python for philosophers

2013-05-12 Thread llanitedave
On Sunday, May 12, 2013 7:51:28 AM UTC-7, Chris Angelico wrote: On Mon, May 13, 2013 at 12:17 AM, Citizen Kant citizenk...@gmail.com wrote: Maybe It'd be good if I explain myself a bit more. What I'm trying here is to grasp Python from the game's abstraction point of view, as if it were,

Re: Red Black Tree implementation?

2013-05-12 Thread duncan smith
On 12/05/13 03:02, duncan smith wrote: On 12/05/13 02:29, Dan Stromberg wrote: On Sat, May 11, 2013 at 4:24 PM, Dan Stromberg drsali...@gmail.com mailto:drsali...@gmail.com wrote: [snip] What should BinaryTree.find() do if it finds a data.node that is None? A call to find(data) should

Re: Old version docs don't link to current version

2013-05-12 Thread Terry Jan Reedy
On 5/12/2013 10:12 AM, Chris Angelico wrote: Not sure if this is an oversight or something deliberate... could be either. From http://docs.python.org/3.0/library/http.server.html there's no link to the current docs, even though from http://docs.python.org/3/library/http.server.html it's

in need of some help regarding my rock paper scissors game

2013-05-12 Thread Alex Norton
im new to python and im in the middle of making a RPS game for a college unit. i have used PyQt to create the GUI and i have received help regarding adding the code to the buttons. but its missing something as the error 'Traceback (most recent call last): File C:\Users\Me\Desktop\testy.py, line

Re: in need of some help...

2013-05-12 Thread Alex Norton
On Saturday, 11 May 2013 23:20:13 UTC+1, Jens Thoms Toerring wrote: Alex Norton ayjayn1...@gmail.com wrote: On Wednesday, 1 May 2013 13:15:28 UTC+1, Jens Thoms Toerring wrote: Of course, it might be nicer to have a result label some- where in the graphical interface which you set

Re: in need of some help regarding my rock paper scissors game

2013-05-12 Thread Benjamin Kaplan
On Sun, May 12, 2013 at 12:33 PM, Alex Norton ayjayn1...@gmail.com wrote: im new to python and im in the middle of making a RPS game for a college unit. i have used PyQt to create the GUI and i have received help regarding adding the code to the buttons. but its missing something as the

Re: object.enable() anti-pattern

2013-05-12 Thread Terry Jan Reedy
On 5/12/2013 1:14 PM, Wayne Werner wrote: On Fri, 10 May 2013, Gregory Ewing wrote: Wayne Werner wrote: You don't ever want a class that has functions that need to be called in a certain order to *not* crash. That seems like an overly broad statement. What do you think the following should

Re: object.enable() anti-pattern

2013-05-12 Thread Terry Jan Reedy
On 5/12/2013 12:48 PM, Wayne Werner wrote: I'll share the anti-pattern that I've seen many times (not actually in Python) class CoolPresenter: def __init__(self): self.view = None self.some_property = None self.other_property = None

Re: Message passing syntax for objects | OOPv2

2013-05-12 Thread Terry Jan Reedy
On 5/12/2013 1:18 PM, Ned Batchelder wrote: On 5/8/2013 10:39 PM, Mark Janssen wrote: ...The field needs re-invented and re-centered.[...] For anyone who want to be involved. See the wikiwikiweb -- a tool that every programmer should know and use -- and these pages: ComputerScienceVersionTwo

Re: Python for philosophers

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 4:13 AM, llanitedave llanited...@veawb.coop wrote: On Sunday, May 12, 2013 7:51:28 AM UTC-7, Chris Angelico wrote: On Mon, May 13, 2013 at 12:17 AM, Citizen Kant citizenk...@gmail.com wrote: Maybe It'd be good if I explain myself a bit more. What I'm trying here is

Re: Old version docs don't link to current version

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 5:32 AM, Terry Jan Reedy tjre...@udel.edu wrote: On 5/12/2013 10:12 AM, Chris Angelico wrote: Was this intentional, along the lines of not touching the old and unsupported docs? Cross referencing was added while 3.2 docs were still subject to revision. x.y docs are

Re: in need of some help...

2013-05-12 Thread Jens Thoms Toerring
Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: (slightly offtopic, sorry.) On Sun, May 12, 2013 at 12:20 AM, Jens Thoms Toerring j...@toerring.de wrote: PS: If I may ask you a favor: consider refraining from using Google's completely broken interface to newsgroups - your post

Re: in need of some help...

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 7:56 AM, Jens Thoms Toerring j...@toerring.de wrote: Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: Gmail automatically hides long quotes. This is helpful in situations like this one. More mail software should implement that functionality. Seriously: once you go

Re: in need of some help...

2013-05-12 Thread Jens Thoms Toerring
Chris Angelico ros...@gmail.com wrote: On Mon, May 13, 2013 at 7:56 AM, Jens Thoms Toerring j...@toerring.de wrote: Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: Gmail automatically hides long quotes. This is helpful in situations like this one. More mail software should implement

Re: in need of some help regarding my rock paper scissors game

2013-05-12 Thread Dave Angel
On 05/12/2013 03:33 PM, Alex Norton wrote: im new to python and im in the middle of making a RPS game for a college unit. i have used PyQt to create the GUI and i have received help regarding adding the code to the buttons. I'm not at all familiar with PyQT, but I have used other GUIs, and

Re: in need of some help...

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 8:58 AM, Jens Thoms Toerring j...@toerring.de wrote: Chris Angelico ros...@gmail.com wrote: On Mon, May 13, 2013 at 7:56 AM, Jens Thoms Toerring j...@toerring.de wrote: Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: Gmail automatically hides long quotes. This

Re: object.enable() anti-pattern

2013-05-12 Thread Greg Ewing
Wayne Werner wrote: On Fri, 10 May 2013, Gregory Ewing wrote: f = open(myfile.dat) f.close() data = f.read() To clarify - you don't want a class that has functions that need to be called in a certain order with *valid input* in order to not crash. Exactly what does happen - a

Differences of != operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Mr. Joe
I seem to stumble upon a situation where != operator misbehaves in python2.x. Not sure if it's my misunderstanding or a bug in python implementation. Here's a demo code to reproduce the behavior - # -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function class

Re: Differences of != operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Ned Batchelder
On 5/12/2013 7:23 PM, Mr. Joe wrote: I seem to stumble upon a situation where != operator misbehaves in python2.x. Not sure if it's my misunderstanding or a bug in python implementation. Here's a demo code to reproduce the behavior - # -*- coding: utf-8 -*- from __future__ import

Re: Differences of != operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Christian Heimes
Am 13.05.2013 01:23, schrieb Mr. Joe: I seem to stumble upon a situation where != operator misbehaves in python2.x. Not sure if it's my misunderstanding or a bug in python implementation. Here's a demo code to reproduce the behavior - Python 2.7 doesn't use the negation of __eq__ when your

Re: Differences of != operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Ian Kelly
On Sun, May 12, 2013 at 5:23 PM, Mr. Joe titani...@gmail.com wrote: I seem to stumble upon a situation where != operator misbehaves in python2.x. Not sure if it's my misunderstanding or a bug in python implementation. Here's a demo code to reproduce the behavior - The != operator is

Re: Differences of != operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Rotwang
On 13/05/2013 00:40, Ian Kelly wrote: On Sun, May 12, 2013 at 5:23 PM, Mr. Joe titani...@gmail.com wrote: I seem to stumble upon a situation where != operator misbehaves in python2.x. Not sure if it's my misunderstanding or a bug in python implementation. Here's a demo code to reproduce the

Re: in need of some help...

2013-05-12 Thread Chris Angelico
On Mon, May 13, 2013 at 9:47 AM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Mon, 13 May 2013 08:18:05 +1000, Chris Angelico ros...@gmail.com declaimed the following in gmane.comp.python.general: No, Chris (not me, the other Chris... *an*other Chris okay, one of the chorus of

Re: Python for philosophers

2013-05-12 Thread alex23
On May 13, 12:30 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: If you are interested in the intersection of programming and philosophy, I strongly recommend that you read Gödel, Escher, Bach: An Eternal Golden Braid by Douglas R. Hofstadter. +1 --

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: Guido has promised an explanation for why he wants to keep the frame hack once he is back at work next week. To help him target that reply appropriately for my concrete objections to retaining it, I'd like to explain a bit more about why I think it's

[issue17954] Support creation of extensible enums through metaclass subclassing

2013-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: I don't think that would be wise - there's currently other logic in _get_mixins that subclasses would then have to duplicate. I was thinking more of an allow_subclass() API that subtypes could override to always return True. EnumMeta would then just factor the

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-12 Thread Nick Coghlan
New submission from Nick Coghlan: Creating this as a separate issue so as not to delay incorporation of the accepted PEP. One legitimate criticism of the accepted PEP 435 is that the combination of requiring explicit assignment of values *and* allowing aliasing by default is that aliases may

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-12 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- dependencies: +Code, test, and doc review for PEP-0435 Enum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17959 ___

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: I also created issue 17959 to track a legitimate concern with the current aliasing design, without impacting incorporation of the accepted PEP. -- ___ Python tracker rep...@bugs.python.org

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-12 Thread Alex Gaynor
Alex Gaynor added the comment: This would preclude code like: class Shape(Enum): rectangle = shape = 2 which seems (to me) to be the most reasonable way to express aliasing. -- nosy: +alex ___ Python tracker rep...@bugs.python.org

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

2013-05-12 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: @Terry: Thanks for the info. I seem to have the elusive * after my username now. I am not sure how this works, but can you review/test/apply the patch now? -- ___ Python tracker rep...@bugs.python.org

[issue17940] extra code in argparse.py

2013-05-12 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: I guess that was simple enough. I am new to this issue tracker for Cpython. How will the patch review/commit proceed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17940

[issue17960] Clarify the required behaviour of locals()

2013-05-12 Thread Nick Coghlan
New submission from Nick Coghlan: As proposed at [1], I would like to tighten up the definition of locals so that defining enum members programmatically is officially supported behaviour. I'll come up with a patch soonish. [1] http://mail.python.org/pipermail/python-dev/2013-May/125917.html

[issue17960] Clarify the required behaviour of locals()

2013-05-12 Thread Ezio Melotti
Ezio Melotti added the comment: See also #17546 and #7083. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17960 ___ ___

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: That's a terrible way to express aliasing, because it's really unclear that rectangle is the canonical name. By contrast: class Shape(Enum): rectangle = 2 oblong = rectangle leaves no doubt as to which is canonical and which is the alias. You never

[issue17606] xml.sax.saxutils.XMLGenerator cannot output with the correct encoding

2013-05-12 Thread Antonio Pérez
Changes by Antonio Pérez ape...@skarcha.com: -- nosy: +skarcha ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17606 ___ ___ Python-bugs-list

[issue17960] Clarify the required behaviour of locals()

2013-05-12 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17960 ___ ___ Python-bugs-list

[issue17934] Add a frame method to clear expensive details

2013-05-12 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17934 ___ ___ Python-bugs-list

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-05-12 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Stefan, I took a quick look at your patch. There is a couple things that stands out. First, I think the implementation of BINGLOBAL and BINGLOBAL_BIG should be moved to another patch. Adding a binary version opcode for GLOBAL is a separate feature and

[issue17666] Extra gzip headers breaks _read_gzip_header

2013-05-12 Thread Georg Brandl
Georg Brandl added the comment: Cherry-picked to 3.2 branch as c31ff361cde3. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17666 ___

[issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings

2013-05-12 Thread Georg Brandl
Georg Brandl added the comment: Thanks, applied to 3.2 branch. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17843 ___

[issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4

2013-05-12 Thread Georg Brandl
Georg Brandl added the comment: Cherry-picked to 3.2 branch. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17857 ___ ___

[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5f62c848f713 by Benjamin Peterson in branch '3.3': prevent IDLE from trying to close when sys.stdin is reassigned (#17838) http://hg.python.org/cpython/rev/5f62c848f713 New changeset bc322854c336 by Georg Brandl in branch 'default': Issue #17838:

[issue17585] IDLE - regression with exit() and quit()

2013-05-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17585 ___ ___ Python-bugs-list

[issue16805] when building docs on Debian 7 -- ERROR: Error in note directive

2013-05-12 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: Ok. I thought doc fixes were exempt. Strange policy there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16805 ___

[issue15902] imp.load_module won't accept None for the file argument for a C extension

2013-05-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15902 ___ ___ Python-bugs-list

[issue17957] remove outdated (and unexcellent) paragraph in whatsnew

2013-05-12 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: Removed file: http://bugs.python.org/file30227/diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17957 ___

[issue17957] remove outdated (and unexcellent) paragraph in whatsnew

2013-05-12 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: Added file: http://bugs.python.org/file30230/diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17957 ___

[issue17585] IDLE - regression with exit() and quit()

2013-05-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17585 ___ ___ Python-bugs-list

[issue17957] remove outdated (and unexcellent) paragraph in whatsnew

2013-05-12 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: uploaded the correct one; sori -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17957 ___ ___

[issue16805] when building docs on Debian 7 -- ERROR: Error in note directive

2013-05-12 Thread Georg Brandl
Georg Brandl added the comment: Please do not comment on policies if you don't understand our release system. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16805 ___

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-12 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- priority: normal - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17959 ___ ___

[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 3.2? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17838 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17954] Support creation of extensible enums through metaclass subclassing

2013-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: I elaborated on this point in http://python-notes.boredomandlaziness.org/en/latest/python3/enum_creation.html#support-for-alternate-declaration-syntaxes However, I'm now wondering if the problem is simply that the no extension of enums rule is more restrictive

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-12 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17959 ___ ___ Python-bugs-list

[issue15535] Fix pickling efficiency of named tuples in 2.7.3

2013-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 31eaf8a137ea by Georg Brandl in branch '3.2': Issue #15535: Fix pickling of named tuples. http://hg.python.org/cpython/rev/31eaf8a137ea -- ___ Python tracker rep...@bugs.python.org

[issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings

2013-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9da98ab823c9 by Georg Brandl in branch '3.2': Issue #17843: Remove bz2 test data that triggers antivirus warnings. http://hg.python.org/cpython/rev/9da98ab823c9 -- ___ Python tracker

[issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4

2013-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset d5b5116bf953 by Serhiy Storchaka in branch '3.2': Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, http://hg.python.org/cpython/rev/d5b5116bf953 -- ___ Python tracker

[issue17915] Encoding error with sax and codecs

2013-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1c01571ce0f4 by Georg Brandl in branch '3.2': Issue #17915: Fix interoperability of xml.sax with file objects returned by http://hg.python.org/cpython/rev/1c01571ce0f4 -- nosy: +python-dev ___ Python

[issue1159051] Handle corrupted gzip files with unexpected EOF

2013-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 854ba6f414a8 by Georg Brandl in branch '3.2': Issue #1159051: Back out a fix for handling corrupted gzip files that http://hg.python.org/cpython/rev/854ba6f414a8 -- ___ Python tracker

[issue17666] Extra gzip headers breaks _read_gzip_header

2013-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset c31ff361cde3 by Serhiy Storchaka in branch '3.2': Close #17666: Fix reading gzip files with an extra field. http://hg.python.org/cpython/rev/c31ff361cde3 -- stage: commit review - committed/rejected ___

[issue17958] int(math.log(2**i, 2))

2013-05-12 Thread Mark Dickinson
Mark Dickinson added the comment: Sorry: this is not a bug, but a difficult-to-avoid consequence of floating-point imprecision: math.log(n, 2) is computed as log(n) / log(2), and each of the log computations and the division can introduce small errors. For what it's worth, Python 3.3 has a

[issue17958] int(math.log(2**i, 2))

2013-05-12 Thread Mark Dickinson
Mark Dickinson added the comment: Postscript: depending on what you're doing, you might also find the int.bit_length method helpful. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17958

[issue17838] Can't assign a different value for sys.stdin in IDLE

2013-05-12 Thread Georg Brandl
Georg Brandl added the comment: Not necessary as per msg188301. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17838 ___ ___ Python-bugs-list

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-12 Thread Ethan Furman
Ethan Furman added the comment: Another approach to handling this, and other, issues is to allow options to EnumMeta. My original aenum code had the default Enum class as unordered, no duplicates allowed, non-indexable, etc., but then allowed options to be passed in such as DUPLICATES to

[issue17915] Encoding error with sax and codecs

2013-05-12 Thread Georg Brandl
Georg Brandl added the comment: Fixed in 3.2, 3.3 and default. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17915 ___

[issue1159051] Handle corrupted gzip files with unexpected EOF

2013-05-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- priority: release blocker - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1159051 ___ ___

[issue1159051] Handle corrupted gzip files with unexpected EOF

2013-05-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- versions: -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1159051 ___

[issue1159051] Handle corrupted gzip files with unexpected EOF

2013-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9c2831fe84e9 by Georg Brandl in branch '3.3': Back out patch for #1159051, which caused backwards compatibility problems. http://hg.python.org/cpython/rev/9c2831fe84e9 New changeset 5400e8fbc1de by Georg Brandl in branch 'default': null-merge

[issue17732] distutils.cfg Can Break venv

2013-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6c5a3d194a10 by Georg Brandl in branch '3.3': Closes issue #17732: ignore install-directory specific options in http://hg.python.org/cpython/rev/6c5a3d194a10 -- nosy: +python-dev ___ Python tracker

[issue17958] int(math.log(2**i, 2))

2013-05-12 Thread Mark Dickinson
Mark Dickinson added the comment: For tracker archaeologists: see also issue #11888, issue #9959. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17958 ___

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-12 Thread Nick Coghlan
New submission from Nick Coghlan: I encountered an interesting suggestion [1] regarding the enum.Enum convenience API: use the member names as their values, rather than the current integers starting from one. Since we're now using definition order rather than value order for iteration, this

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-12 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- dependencies: +Code, test, and doc review for PEP-0435 Enum versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17961 ___

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: Another post-incorporation proposal (issue 17961) relating to the values used for the functional API. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17947

[issue17954] Support creation of extensible enums through metaclass subclassing

2013-05-12 Thread Ethan Furman
Ethan Furman added the comment: Make it simpler: class EnumMeta(): allow_subclass = False class MyEnumMeta(EnumMeta): allow_subclass = True -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17954

[issue17934] Add a frame method to clear expensive details

2013-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Mostly looks good to me, but I think I'd prefer that attempts to clear a running frame raise RuntimeError with an appropriate message. Hmm, why not. My intuition was to make frame.clear() a best-effort method, but this sounds ok too. I also wonder how this

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-12 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17961 ___ ___ Python-bugs-list

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Stefan, I took a quick look at your patch. There is a couple things that stands out. It would be nice if you could reconcile each other's work. Especially so I don't re-implement framing on top of something else :-) Adding a binary version opcode for GLOBAL

[issue17732] distutils.cfg Can Break venv

2013-05-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17732 ___

[issue17962] Broken OpenSSL version in Windows builds

2013-05-12 Thread Antoine Pitrou
New submission from Antoine Pitrou: 3.3 and default are currently fetching OpenSSL 1.0.1d for the Windows builds. It seems OpenSSL 1.0.1d was a kind of brown paper bag release, they've released 1.0.1e since (some of test_ssl can fail on 1.0.1d and succeed on 1.0.1e, as experienced on my Linux

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-12 Thread Ethan Furman
Ethan Furman added the comment: After more thought, I think we should leave the shortened version of _StealthProperty as is. The reasoning being that if _StealthProperty does the __getattr__ lookup itself, and fails, it will return an AttributeError... and then Python will use __getattr__

[issue17425] Update OpenSSL versions in Windows builds

2013-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Opened #17962 to tackle the broken OpenSSL issue. -- stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17425

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-12 Thread Eli Bendersky
Eli Bendersky added the comment: Nick, could you open a separate issue for the frame hack discussion, like you did for the other things? You can make this one depend on it, if you feel it's a blocker, but let's please not intermix more discussion here. --

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: Specifically, my suggestion is that for auto-created enum members, the invariant asset x.value == str(x) should hold. In flufl.enum, using integers made sense because it relies on sorting of values to determine the iteration order. That's no longer a concern

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-12 Thread Ethan Furman
Ethan Furman added the comment: In flufl.enum integers also made since as that was the default back-end data type. Currently, the functional method allows a type declaration. The behavior there could be tweaked such that no specification meant no value (a truly valueless enum!), type=int

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: Hmm, that's an interesting point about allowing operations on the already defined values. You could get around that by requiring that the wrapper be explicit when definined the alias: class Shape(enum.Enum): ... rectangle = 1 ... oblong =

[issue17954] Support creation of extensible enums through metaclass subclassing

2013-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: Simply removing the restriction isn't actually appropriate, as the variants that allow addition of new members should *not* allow addition of new descriptors. That's why I'm wondering if the current subclassing restriction is wrong: if you subclass an Enum

  1   2   >