Re: Array of Functions

2015-05-26 Thread richard_riehle
I realized that I mentioned earlier that I found a solution to my original question, but that I never posted an example of the solution. So, here is a simplified example for anyone who is interested. def fArray(fselect, fparm = 1): def A1(p = fparm): if p == 1:

Re: Array of Functions

2015-05-26 Thread Laura Creighton
In a message of Tue, 26 May 2015 19:43:31 -0500, richard_riehle writes: I realized that I mentioned earlier that I found a solution to my original question, but that I never posted an example of the solution. So, here is a simplified example for anyone who is interested. def fArray(fselect,

Re: should self be changed?

2015-05-26 Thread zipher
On Tuesday, May 26, 2015 at 12:28:31 PM UTC-5, Mark Lawrence wrote: On 26/05/2015 17:37, zipher wrote: Would it be prudent to rid the long-standing argument (pun unintended) about self and the ulterior spellings of it, by changing it into a symbol rather than a name? Yes, how about you

[issue24293] Windows installer unreadable with std/custom themes

2015-05-26 Thread Mike Miller
New submission from Mike Miller: The new Windows installer displays itself with an HTML (or perhaps skinned) interface with hard-coded white background which does not adhere to the desktop GUI color scheme chosen by the user. Many times this is only an aesthetic problem, but it may cause the

[issue22758] Regression in Python 3.2 cookie parsing

2015-05-26 Thread Tim Graham
Changes by Tim Graham timogra...@gmail.com: Added file: http://bugs.python.org/file39512/secure-httponly-3.2-backport.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22758 ___

Re: Array of Functions

2015-05-26 Thread Gary Herron
On 05/26/2015 05:43 PM, richard_riehle wrote: I realized that I mentioned earlier that I found a solution to my original question, but that I never posted an example of the solution. So, here is a simplified example for anyone who is interested. def fArray(fselect, fparm = 1): def

[issue22758] Regression in Python 3.2 cookie parsing

2015-05-26 Thread Tim Graham
Tim Graham added the comment: Patch rebased again after cookie fix from #22931. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22758 ___ ___

PyDev 4.1.0 Released

2015-05-26 Thread Fabio Zadrozny
What is PyDev? --- PyDev is an open-source Python IDE on top of Eclipse for Python, Jython and IronPython development. It comes with goodies such as code completion, syntax highlighting, syntax analysis, code analysis, refactor, debug, interactive console, etc. Details

[issue23560] Group the docs of similar methods in stdtypes.rst

2015-05-26 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23560 ___ ___

[issue24292] wsgiref.simple_server.WSGIRequestHandler doesn't log request timeouts

2015-05-26 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24292 ___ ___

Re: should self be changed?

2015-05-26 Thread zipher
On Tuesday, May 26, 2015 at 11:57:44 AM UTC-5, Laura Creighton wrote: In a message of Tue, 26 May 2015 09:37:29 -0700, zipher writes: Would it be prudent to rid the long-standing argument (pun unintended) about self and the ulterior spellings of it, by changing it into a symbol rather than a

[issue24293] Windows installer unreadable with std/custom themes

2015-05-26 Thread Steve Dower
Steve Dower added the comment: Thanks, good catch. I'm not entirely sure how we ended up in this state, since the background is actually the system colour and the text is currently hardcoded, but I'll go through and make sure that the system colour indexes are used throughout. FWIW, it's

[issue24293] Windows installer unreadable with std/custom themes

2015-05-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset a77214dbf1f3 by Steve Dower in branch '3.5': Issue #24293: Fixes installer colors to use system settings throughout. https://hg.python.org/cpython/rev/a77214dbf1f3 New changeset 37ed61b1234a by Steve Dower in branch 'default': Issue #24293: Fixes

Re: should self be changed?

2015-05-26 Thread Steven D'Aprano
On Wednesday 27 May 2015 05:46, Marko Rauhamaa wrote: Python's practice works. However, a small problem is presented by nested classes: class Connection: def __init__(self): class Idle: def signal_start(self): # how to refer to

[issue21970] Broken code for handling file://host in urllib.request.FileHandler.file_open

2015-05-26 Thread Martin Panter
Martin Panter added the comment: I do not believe the change fixes anything on its own. It essentially just changed the error message to something even worse, and the added test case already passes without the change. I am posting a patch which cleans up the code and related tests. It also

Re: should self be changed?

2015-05-26 Thread zipher
On Tuesday, May 26, 2015 at 11:57:44 AM UTC-5, Laura Creighton wrote: In a message of Tue, 26 May 2015 09:37:29 -0700, zipher writes: Would it be prudent to rid the long-standing argument (pun unintended) about self and the ulterior spellings of it, by changing it into a symbol rather than a

Re: should self be changed?

2015-05-26 Thread zipher
On Tuesday, May 26, 2015 at 9:48:25 PM UTC-5, zipher wrote: On Tuesday, May 26, 2015 at 12:28:31 PM UTC-5, Mark Lawrence wrote: On 26/05/2015 17:37, zipher wrote: Would it be prudent to rid the long-standing argument (pun unintended) about self and the ulterior spellings of it, by

Re: should self be changed?

2015-05-26 Thread Ben Finney
zipher dreamingforw...@gmail.com writes: Arrgh. Sorry, that was meant privately... I'm glad we saw it publicly, so that we get more of an idea how you treat people. That kind of homophobic slur is inappropriate from anyone in this community. Kindly cut it out altogether. -- \ “Always

Re: OpenCV with Python (cv or cv2)

2015-05-26 Thread IronManMark20
On Tuesday, May 26, 2015 at 6:52:00 AM UTC-7, Markos wrote: Hi, I want to use OpenCV with Python. I installed version 2.4.9 (http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip/) in debian Squeeze running Python 2.6.6. Using the tutorial:

Re: should self be changed?

2015-05-26 Thread Steven D'Aprano
On Wednesday 27 May 2015 02:37, zipher wrote: Would it be prudent to rid the long-standing argument (pun unintended) about self and the ulterior spellings of it, by changing it into a symbol rather than a name? No. Something like: class MyClass(object): def __init__(@):

Re: should self be changed?

2015-05-26 Thread Steven D'Aprano
On Wednesday 27 May 2015 06:45, Mark Lawrence wrote: Apart from breaking all the tools that rely on self being spelt self this looks like an excellent idea. Tools which rely on self being spelled self are already broken. It's a convention, nothing more, and there are various good reasons for

[issue24293] Windows installer unreadable with std/custom themes

2015-05-26 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24293 ___

Re: should self be changed?

2015-05-26 Thread Steven D'Aprano
On Wednesday 27 May 2015 14:39, Ben Finney wrote: zipher dreamingforw...@gmail.com writes: Arrgh. Sorry, that was meant privately... I'm glad we saw it publicly, so that we get more of an idea how you treat people. That kind of homophobic slur is inappropriate from anyone in this

[issue24009] Get rid of rare format units in PyArg_Parse*

2015-05-26 Thread Martin Panter
Martin Panter added the comment: “u#” should not be deprecated without first deprecating “u”, which is less useful due to not returning a buffer length. Also, I have always been mystified about how “s#”, “z#”, “y” and “y#” can properly to return a pointer into a buffer for arbitrary immutable

Re: Creating a reliable sandboxed Python environment

2015-05-26 Thread Paul Rubin
davidf...@gmail.com writes: Has anyone on this list attempted to sandbox Python programs in a serious fashion? I'd be interested to hear your approach. There is something like that for C++ and it is quite complicated: https://github.com/Eelis/geordi I expect that for Python you'd have to do

[issue24287] Let ElementTree prolog include comments and processing instructions

2015-05-26 Thread Stefan Behnel
Stefan Behnel added the comment: FTR, lxml's Element class has addnext() and addprevious() methods which are commonly used for this purpose. But ET can't adopt those due to its different tree model. I second Martin's comment that ET.append() is a misleading name. It suggests adding stuff to

Re: Creating a reliable sandboxed Python environment

2015-05-26 Thread Steven D'Aprano
On Tuesday 26 May 2015 12:24, davidf...@gmail.com wrote: I am writing a web service that accepts Python programs as input, runs the provided program with some profiling hooks, and returns various information about the program's runtime behavior. To do this in a safe manner, I need to be able

[issue10685] trace does not ignore --ignore-module

2015-05-26 Thread Tom Hines
Tom Hines added the comment: Test attached. Paste into test/test_trace.py. I tested in 2.7 and 3.4. Feel free to modify it. -- Added file: http://bugs.python.org/file39503/test_ignoredir.py ___ Python tracker rep...@bugs.python.org

[issue24288] Include/opcode.h is modified during building

2015-05-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Changeset eeeb666a5365 in issue24017 unintentionally changed formatting of generated file Include/opcode.h. Now clean building CPython modifies Include/opcode.h. One solution is to restore formatting of Include/opcode.h (regenerate it and commit). Other

[issue24009] Get rid of rare format units in PyArg_Parse*

2015-05-26 Thread Martin Panter
Martin Panter added the comment: Yes I just figured out that myself. Specifically, PyBufferProcs.bf_releasebuffer has to be NULL, and the buffer stays alive as long as the object stays alive. Also it looks like I was wrong about “u” being useless. I was tricked by a contradiction in the

[issue24278] Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings

2015-05-26 Thread Martin Panter
Martin Panter added the comment: Here is a patch. Looking at the code, s#, z#, y and y# are the conversions that call convertbuffer(). These require that the object does not have a PyBufferProcs.bf_releasebuffer() method, which guarantees that the buffer’s lifetime is the same as the

[issue24286] Should OrderedDict.viewitems compare equal to dict.viewitems when the items are equal?

2015-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't know if it is worth to backport this feature (dict views were registered in 1f024a95e9d9), but the patch itself LGTM. I think tests should be foreported to 3.x (if they don't exist in 3.x). Are there generic set tests similar to mapping_tests and

Re: Documentaion of dunder methods

2015-05-26 Thread Steven D'Aprano
On Tuesday 26 May 2015 14:34, Ian Kelly wrote: Apart from PEP 8, is this documented anywhere in the official documentation? If so, I have been unable to find it. https://docs.python.org/3/reference/lexical_analysis.html#reserved- classes-of-identifiers That's the bunny! Thanks for that.

[issue24009] Get rid of rare format units in PyArg_Parse*

2015-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: “s#”, “z#”, “y” and “y#” work only with read-only buffers, for which PyBuffer_Release() is no-op operation. Initially they was designed for work with old buffer protocol that doesn't support releasing a buffer. --

[issue23359] Speed-up set_lookkey()

2015-05-26 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- versions: +Python 3.6 -Python 3.5 Added file: http://bugs.python.org/file39505/nd_lookkey_insertkey3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23359

[issue24286] Should OrderedDict.viewitems compare equal to dict.viewitems when the items are equal?

2015-05-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset ff8b603ee51e by Raymond Hettinger in branch 'default': Issue #24286: Forward port dict view abstract base class tests. https://hg.python.org/cpython/rev/ff8b603ee51e -- ___ Python tracker

[issue24286] Should OrderedDict.viewitems compare equal to dict.viewitems when the items are equal?

2015-05-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't know if it is worth to backport this feature I don't think so either. The Iterator registry is a bit of a waste. Are there generic set tests similar to mapping_tests and seq_tests? Not that I know of. Also, I don't see the need. --

[issue24286] Should OrderedDict.viewitems compare equal to dict.viewitems when the items are equal?

2015-05-26 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24286 ___ ___

Re: Documentaion of dunder methods

2015-05-26 Thread Mark Lawrence
On 26/05/2015 04:30, Rustom Mody wrote: On Tuesday, May 26, 2015 at 8:48:11 AM UTC+5:30, Steven D'Aprano wrote: On Tue, 26 May 2015 12:17 pm, Steven D'Aprano wrote: In other words, dunder methods are reserved for use by the core developers for the use of the Python interpreter. Er, that's

Re: Creating a reliable sandboxed Python environment

2015-05-26 Thread Laura Creighton
In a message of Tue, 26 May 2015 17:10:30 +1000, Steven D'Aprano writes: My sense is that the only way to safely sandbox Python is to create your own Python implementation designed with security in mind. You can't get there starting from CPython. Maybe Jython? You get there starting with PyPy.

[issue24286] Should OrderedDict.viewitems compare equal to dict.viewitems when the items are equal?

2015-05-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9213c70c67d2 by Raymond Hettinger in branch '2.7': Issue #24286: Register dict views with the MappingView ABCs. https://hg.python.org/cpython/rev/9213c70c67d2 -- nosy: +python-dev ___ Python tracker

Re: Creating a reliable sandboxed Python environment

2015-05-26 Thread Laura Creighton
In a message of Tue, 26 May 2015 09:53:56 +0200, Laura Creighton writes: In a message of Tue, 26 May 2015 17:10:30 +1000, Steven D'Aprano writes: My sense is that the only way to safely sandbox Python is to create your own Python implementation designed with security in mind. You can't get there

Re: Creating a reliable sandboxed Python environment

2015-05-26 Thread Ned Batchelder
On Monday, May 25, 2015 at 10:24:32 PM UTC-4, davi...@gmail.com wrote: I am writing a web service that accepts Python programs as input, runs the provided program with some profiling hooks, and returns various information about the program's runtime behavior. To do this in a safe manner, I

[issue16927] Separate built-in types from functions and group similar functions in functions.rst

2015-05-26 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16927 ___ ___ Python-bugs-list

[issue24258] BZ2File objects do not have name attribute

2015-05-26 Thread Cliff Dyer
Cliff Dyer added the comment: I'd be happy to take a look at this one, if no one else is working on it. -- nosy: +jcd ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24258 ___

[issue24281] String formatting: incorrect number of decimal places

2015-05-26 Thread Eric V. Smith
Eric V. Smith added the comment: And I just double checked: the entirety of the sentence you quoted is: The precision is a decimal number indicating how many digits should be displayed after the decimal point for a floating point value formatted with 'f' and 'F', or before and after the

[issue24285] regression for importing extensions in packages

2015-05-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 55e6f3f94b99 by Nick Coghlan in branch '3.5': Issue #24285: fix importing extensions from packages https://hg.python.org/cpython/rev/55e6f3f94b99 New changeset 32ee7b9d58c9 by Nick Coghlan in branch 'default': Merge fix for issue #24285 from 3.5

[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-26 Thread Nick Coghlan
Nick Coghlan added the comment: I registered the fix for importing extension modules from packages against issue 24285 in the commit and NEWS file rather than against this original implementation RFE. Commit references in http://bugs.python.org/issue24285#msg244098 -- resolution: -

Re: Creating a reliable sandboxed Python environment

2015-05-26 Thread marco . nawijn
On Tuesday, May 26, 2015 at 4:24:32 AM UTC+2, davi...@gmail.com wrote: I am writing a web service that accepts Python programs as input, runs the provided program with some profiling hooks, and returns various information about the program's runtime behavior. To do this in a safe manner, I

Re: Json Comaprision

2015-05-26 Thread pra devOPS
Hey all thanks for the answers, I am done wiht the same . Sorry fore delayed replied On Wed, May 6, 2015 at 9:27 AM, John Gordon gor...@panix.com wrote: In mailman.164.1430902487.12865.python-l...@python.org pra devOPS siv.dev...@gmail.com writes: I wanted to compare two json files

[issue23560] Group the docs of similar methods in stdtypes.rst

2015-05-26 Thread Martin Panter
Martin Panter added the comment: Here is a patch that groups similar methods of the str() class together at various levels. I added an alphabetical index of the methods, currently as a big paragraph of hyperlinks in the existing String Methods section. Then I added the following seven new

[issue24260] TabError behavior doesn't match documentation

2015-05-26 Thread Stefan Krah
Stefan Krah added the comment: Prohibiting tabs after spaces is not enough. No, I really meant that once a new block is started with tabs, all following nested blocks must use tabs for indentation. The only place where spaces would be allowed is for aligment in logical lines that extend over

[issue24285] regression for importing extensions in packages

2015-05-26 Thread Nick Coghlan
Nick Coghlan added the comment: Since this error was in the beta release, I used this issue reference in the NEWS file, rather than the original implementation issue. -- resolution: duplicate - fixed ___ Python tracker rep...@bugs.python.org

[issue24281] String formatting: incorrect number of decimal places

2015-05-26 Thread James Luscher
James Luscher added the comment: Eric, I am not familiar with the 'g' format and did not know it was the default, but the documentation, read fully, is correct. It just took the response of Christopher Welborn to wake me up (it was a LONG day and I was struggling to understand the problem -

[issue21998] asyncio: support fork

2015-05-26 Thread Yury Selivanov
Yury Selivanov added the comment: I was thinking only in the child. The parent should be able to continue to use the loop as if the fork didn't happen, right? Yes, everything should be fine. I'll rephrase my question: do you think there is a way (and need) to at least throw a warning in

[issue21998] asyncio: support fork

2015-05-26 Thread Martin Richard
Martin Richard added the comment: Hi, My patch was a variation of haypo's patch. The goal was to duplicate the loop and its internal objects (loop and self pipes) without changing much to its state from the outside (keeping callbacks and active tasks). I wanted to be conservative with this

[issue21998] asyncio: support fork

2015-05-26 Thread Yury Selivanov
Yury Selivanov added the comment: That's really the problem of the code that calls fork(), not directly of the event loop. There are some very solid patterns around that (I've written several in the distant past, and Unix hasn't changed that much :-). Alright ;) I'll draft a patch sometime

Re: should self be changed?

2015-05-26 Thread random832
On Tue, May 26, 2015, at 12:57, Laura Creighton wrote: Guido did. :) http://neopythonic.blogspot.se/2008/10/why-explicit-self-has-to-stay.html It's worth noting that the dynamically modify a class argument (and to some extent the decorator argument) misses Javascript's solution - _any_

[issue21998] asyncio: support fork

2015-05-26 Thread Guido van Rossum
Guido van Rossum added the comment: I don't understand. If the fork fails nothing changes right? I guess I'm missing some context or use case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21998

[issue21998] asyncio: support fork

2015-05-26 Thread Yury Selivanov
Yury Selivanov added the comment: I don't understand. If the fork fails nothing changes right? I guess I'm missing some context or use case. Maybe I'm wrong about this. My line of thoughts is: a failed fork() call is a bug in the program. Now, the master process will continue operating as

[issue21998] asyncio: support fork

2015-05-26 Thread Yury Selivanov
Yury Selivanov added the comment: I would therefore, in the child after a fork, close the loop without breaking the selector state (closing without unregister()'ing fds), unset the default loop so get_event_loop() would create a new loop, then raise RuntimeError. I can elaborate on the

[issue16991] Add OrderedDict written in C

2015-05-26 Thread Eric Snow
Eric Snow added the comment: Eric I realize that O (1) deletion is hard, and don't see a good way around it without changing the implementation ... I just think that the preserving the current C layout may be forcing an even more complicated solution than neccessary. I am nervous

Re: OpenCV with Python (cv or cv2)

2015-05-26 Thread Thomas 'PointedEars' Lahn
Markos wrote: ^^ Please append your last name. I want to use OpenCV with Python. I installed version 2.4.9 (http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip/) in debian Squeeze running Python 2.6.6. Using the tutorial:

[issue24289] can't start Python3 due to ImportError of copy_reg

2015-05-26 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- components: -2to3 (2.x to 3.x conversion tool) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24289 ___

Re: SyntaxError on progress module

2015-05-26 Thread Chris Angelico
On Wed, May 27, 2015 at 1:59 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 26/05/2015 16:48, alb wrote: Hi everyone, I've installed the 'progress' module (ver 1.2) and I have the following error when used: File

should self be changed?

2015-05-26 Thread zipher
Would it be prudent to rid the long-standing argument (pun unintended) about self and the ulterior spellings of it, by changing it into a symbol rather than a name? Something like: class MyClass(object): def __init__(@): @.dummy = None OR, even better, getting *rid of it* in

[issue21998] asyncio: support fork

2015-05-26 Thread Guido van Rossum
Guido van Rossum added the comment: I think only (3) is reasonable -- raise RuntimeError. There are too many use cases to consider and the behavior of the selectors seems to vary as well. Apps should ideally not fork with an event loop open; the only reasonable thing to do after a fork with

SyntaxError on progress module

2015-05-26 Thread alb
Hi everyone, I've installed the 'progress' module (ver 1.2) and I have the following error when used: File /home/debian/repos/2418_IASI-NG/Documents/Tools/tex_tool/venv/local/lib/python3.2/site-packages/progress/bar.py, line 48 empty_fill = u'∙' ^ SyntaxError:

Re: should self be changed?

2015-05-26 Thread Ned Batchelder
On Tuesday, May 26, 2015 at 3:47:20 PM UTC-4, Marko Rauhamaa wrote: zipher dreamingforw...@gmail.com: Would it be prudent to rid the long-standing argument (pun unintended) about self and the ulterior spellings of it, by changing it into a symbol rather than a name? Something like:

[issue24270] PEP 485 (math.isclose) implementation

2015-05-26 Thread Tal Einat
Tal Einat added the comment: Attached is a revised patch including changed due to the reviews by Berker and Yuri. The significant changes from the previous patch are: 1. The rel_tol and abs_tol parameters have been made keyword-only. 2. The tests have been extracted into a separate TestCase

[issue24292] wsgiref.simple_server.WSGIRequestHandler doesn't log request timeouts

2015-05-26 Thread Jonathan Kamens
New submission from Jonathan Kamens: http.BaseHTTPRequestHandler logs request timeouts. In handle_one_request(): except socket.timeout as e: #a read or a write timed out. Discard this connection self.log_error(Request timed out: %r, e)

Re: should self be changed?

2015-05-26 Thread garabik-news-2005-05
zipher dreamingforw...@gmail.com wrote: Would it be prudent to rid the long-standing argument (pun unintended) about self and the ulterior spellings of it, by changing it into a symbol rather than a name? Something like: class MyClass(object): def __init__(@): @.dummy =

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2015-05-26 Thread Jonathan Kamens
New submission from Jonathan Kamens: The _write method of wsgiref.handlers.SimpleHandler reads as follows: def _write(self,data): self.stdout.write(data) The problem here is that calling write() on a socket is not actually guaranteed to write all of the data in the buffer. If the

[issue21998] asyncio: support fork

2015-05-26 Thread Guido van Rossum
Guido van Rossum added the comment: I don't actually know if the 5th option is possible. My strong requirement is that no matter what the child process does, the parent should still be able to continue using the loop. IMO it's better to leak a FD in the child than to close a resource owned by

[issue24290] c_uint32 bitfields break structures

2015-05-26 Thread Ned Deily
Ned Deily added the comment: Without diving into the details of your test program, I get the same results on a 64-bit Debian Python 2.7.9 as with a 64-bit OS X 2.7.10: c_uint32 TESTS: Class Name exponentnumber Signfloat binary repr

Re: different types of inheritence...

2015-05-26 Thread zipher
Apart from object composition or mix-in style, I want to illustrate something regarding the arrow of inheritance. class super_dict(dict): def __init__(self, init={}, default_value=0, collision_function=None): *expands what dict can do* def get_default(self): #stupid

Re: should self be changed?

2015-05-26 Thread Marko Rauhamaa
Ned Batchelder n...@nedbatchelder.com: I would find it much clearer to not use a nested class at all, and instead to pass the object into the constructor: Nested classes are excellent and expressing the state pattern URL: http://en.wikipedia.org/wiki/State_pattern. Marko --

[issue24290] c_uint32 bitfields break structures

2015-05-26 Thread Rony Batista
New submission from Rony Batista: ctypes Structures with c_uint32 bitfields have strange behaviour on OS X. In the attached code when the field number is set, it changes the whole 32 bits, even thou its meant to be 23 bits. The behavior is unexpected in: OS X: Python 2.7.9 The behavior is as

[issue16500] Add an 'atfork' module

2015-05-26 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16500 ___ ___ Python-bugs-list

[issue24284] Inconsistency in startswith/endswith

2015-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please help me with wording? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24284 ___ ___

[issue24290] c_uint32 bitfields break structures

2015-05-26 Thread Ronald Oussoren
Ronald Oussoren added the comment: You forgot to actually attach the code. -- nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24290 ___

[issue23509] Speed up Counter operators

2015-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps correct __pos__ docstring? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23509 ___ ___

[issue23509] Speed up Counter operators

2015-05-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- Removed message: http://bugs.python.org/msg244128 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23509 ___

[issue23509] Speed up Counter operators

2015-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps update __pos__ docstring? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23509 ___ ___

[issue21998] asyncio: support fork

2015-05-26 Thread Martin Richard
Martin Richard added the comment: 015-05-26 20:40 GMT+02:00 Yury Selivanov rep...@bugs.python.org: Yury Selivanov added the comment: The only solution to safely fork a process is to fix loop.close() to check if it's called from a forked process and to close the loop in a safe way (to avoid

Re: should self be changed?

2015-05-26 Thread Marko Rauhamaa
zipher dreamingforw...@gmail.com: Would it be prudent to rid the long-standing argument (pun unintended) about self and the ulterior spellings of it, by changing it into a symbol rather than a name? Something like: class MyClass(object): def __init__(@): @.dummy = None OR,

[issue24290] c_uint32 bitfields break structures

2015-05-26 Thread Rony Batista
Rony Batista added the comment: Silly me, Heres the code. -- Added file: http://bugs.python.org/file39508/ctypesBug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24290 ___

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2015-05-26 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +pje versions: +Python 3.6 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24291 ___

[issue23359] Speed-up set_lookkey()

2015-05-26 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: Added file: http://bugs.python.org/file39510/new_set_timings.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23359 ___

Re: should self be changed?

2015-05-26 Thread Mark Lawrence
On 26/05/2015 21:26, garabik-news-2005...@kassiopeia.juls.savba.sk wrote: zipher dreamingforw...@gmail.com wrote: Would it be prudent to rid the long-standing argument (pun unintended) about self and the ulterior spellings of it, by changing it into a symbol rather than a name? Something like:

[issue24292] wsgiref.simple_server.WSGIRequestHandler doesn't log request timeouts

2015-05-26 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +pje versions: +Python 3.6 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24292 ___

Re: different types of inheritence...

2015-05-26 Thread Michael Torrie
On 05/26/2015 08:57 AM, zipher wrote: Comprende? I'm not trying to be cryptic here. This is a bit of OOP theory to be discussed. No, sorry. Maybe an actual example (with use case) would spur discussion. -- https://mail.python.org/mailman/listinfo/python-list

Re: different types of inheritence...

2015-05-26 Thread Ian Kelly
On Tue, May 26, 2015 at 2:52 PM, Michael Torrie torr...@gmail.com wrote: On 05/26/2015 08:57 AM, zipher wrote: Comprende? I'm not trying to be cryptic here. This is a bit of OOP theory to be discussed. No, sorry. Maybe an actual example (with use case) would spur discussion. Better yet,

Re: should self be changed?

2015-05-26 Thread Vito De Tullio
Mark Lawrence wrote: def __init__(ስ): ስ.dummy = None Apart from breaking all the tools that rely on self being spelt self this looks like an excellent idea. too bad for the tools: using the name self is just a convention, not a rule. -- By ZeD --

Re: should self be changed?

2015-05-26 Thread Tim Chase
On 2015-05-26 21:45, Mark Lawrence wrote: class MyClass(object): def __init__(ስ): ስ.dummy = None Apart from breaking all the tools that rely on self being spelt self this looks like an excellent idea. Though to be fair, they *are* broken tools if they rely on self since there's

[issue24270] PEP 485 (math.isclose) implementation

2015-05-26 Thread Tal Einat
Tal Einat added the comment: Significant questions brought up by Berker Peksağ in his review of the latest patch (thanks for the review!): 1. Should the tolerance parameters be keyword-only? Berker suggests that they should be. I agree. 2. Should the math.isclose() tests be split into a

Re: OpenCV with Python (cv or cv2)

2015-05-26 Thread Laura Creighton
In a message of Tue, 26 May 2015 10:24:30 -0300, Markos writes: Hi, I want to use OpenCV with Python. I installed version 2.4.9 (http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip/) in debian Squeeze running Python 2.6.6. Using the tutorial:

[issue24284] Inconsistency in startswith/endswith

2015-05-26 Thread R. David Murray
R. David Murray added the comment: Just in the what's new porting section, I think. The fact that there should be very little to no code that relies on this is why I'd like to see it fixed. The fact that the report was a theoretical one, and not one that broke code, is why I think we should

[issue24289] can't start Python3 due to ImportError of copy_reg

2015-05-26 Thread R. David Murray
R. David Murray added the comment: copyreg.py is part of the standard library, but you obviously have a file shadowing it in your site-packages. If this is a result of the pip upgrade, you should report this to the pip tracker. -- nosy: +r.david.murray resolution: - third party

Re: a more precise distance algorithm

2015-05-26 Thread random832
On Mon, May 25, 2015, at 15:21, ravas wrote: Is this valid? Does it apply to python? Any other thoughts? :D The math.hypot function uses the C library's function which should deal with such concerns internally. There is a fallback version in case the C library does not have this function, in

  1   2   >