[issue24365] Conditionalize 3.5 additions to the stable ABI

2015-06-02 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24365 ___

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Eddilbert Macharia
On Tuesday, June 2, 2015 at 2:27:31 PM UTC+3, Steven D'Aprano wrote: On Tue, 2 Jun 2015 08:36 pm, Eddilbert Macharia wrote: you guys are just confusing me, you are going in loops, and still i have understood ,what makes everything in python an object. hey is where i'm at : *** type in

[issue24369] Using OrderedDict.move_to_end during iteration is problematic.

2015-06-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: The C version should defend itself against any key-changes during iteration (see the state counter used in deque objects for an example of how to do this). The pure python version of OrderedDict has only minimal defenses against mutating during

[issue24368] Some C OrderedDict methods need to support keyword arguments.

2015-06-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 38ffea158630 by Eric Snow in branch '3.5': Issue #24368: Support keyword arguments in OrderedDict methods. https://hg.python.org/cpython/rev/38ffea158630 -- nosy: +python-dev ___ Python tracker

[issue24368] Some C OrderedDict methods need to support keyword arguments.

2015-06-02 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24368 ___

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread R. David Murray
R. David Murray added the comment: Since the email package has the correct logic for handling the blank continuation line case (even in Python2) (because, again, that derives from the original email standard), it might be reasonable to use feedparser's headersonly mode. If necessary we can

[issue24369] Using OrderedDict.move_to_end during iteration is problematic.

2015-06-02 Thread Eric Snow
Eric Snow added the comment: Sounds good. Thanks, Raymond. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24369 ___ ___ Python-bugs-list

[issue24342] coroutine wrapper reentrancy

2015-06-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset d11cb1218489 by Yury Selivanov in branch '3.5': Issue 24342: No need to use PyAPI_FUNC for _PyEval_ApplyCoroutineWrapper https://hg.python.org/cpython/rev/d11cb1218489 New changeset b83fbc13ae1e by Yury Selivanov in branch 'default': Issue 24342:

Issuing commands using exec_command() of paramiko AND also sending commands together

2015-06-02 Thread Pythonista
Using paramiko's exec_command(), i would like to send a command, process its output and do it for several other commands. I notice that its not quick enough or something like that. How would I handle that scenario AND also providing multiple commands together (there is 1 post on stackoverflow

Re: should self be changed?

2015-06-02 Thread Ian Kelly
On Tue, Jun 2, 2015 at 11:19 AM, Marko Rauhamaa ma...@pacujo.net wrote: Steven D'Aprano st...@pearwood.info: On Fri, 29 May 2015 12:00 pm, Steven D'Aprano wrote: [...] in a language where classes are themselves values, there is no reason why a class must be instantiated, particularly if

[issue24370] OrderedDict behavior is unclear with misbehaving keys.

2015-06-02 Thread Eric Snow
New submission from Eric Snow: How well does OrderedDict need to behave in the face of keys with unstable hashes (e.g. define __hash__ with varying results across calls)? I would expect the behavior to be undefined (though non-crashing). Here's an example of a misbehaving key: class

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Mark Lawrence
On 03/06/2015 05:16, Eddilbert Macharia wrote: Sadly yes i have worked with java, and that is what is causing me so much grief.In java objects are instance of a class.pretty simple. You might like to read http://dirtsimple.org/2004/12/python-is-not-java.html and

[issue5319] stdout error at interpreter shutdown fails to return OS error status

2015-06-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't know how acceptable it is to add a return value to Py_Finalize(). Can it break the stable ABI? -- nosy: +loewis, steve.dower ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5319

Re: Knowledge Requirements for Machine Learning (SKLearn)

2015-06-02 Thread Laura Creighton
https://www.udacity.com/course/intro-to-machine-learning--ud120 Free online course using Python. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Eddilbert Macharia
On Sunday, May 31, 2015 at 5:34:20 PM UTC+3, Eddilbert Macharia wrote: Hello All , I'm wrecking my head trying to understand. where the class object comes into play . Is it only meant to act as base class and does it mean there is an actual class called object in python which all the

[issue24361] OrderedDict: crash with threads

2015-06-02 Thread Stefan Krah
New submission from Stefan Krah: I tried to disprove my own claim of unreachable code in resize()/get_index() using a convoluted threaded test case. The code still fails to be reached, but another segfault turned up. -- components: Extension Modules files: crash-th.py messages: 244661

[issue24358] Should compression file-like objects provide .fileno(), misleading subprocess?

2015-06-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: Blech, typo earlier since they produce the *compressed* data (likely useless) when read as subprocess stdin. Context should make it obvious, but trying to be clear. -- ___ Python tracker rep...@bugs.python.org

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Rustom Mody
On Tuesday, June 2, 2015 at 4:16:02 PM UTC+5:30, BartC wrote: On 01/06/2015 23:59, BartC wrote: In the new class style, type and class sort of mean the same thing. I'm developing a new language along the lines of Python, (After reading some of the rest of the sub-thread, I'm glad I

[issue23239] SSL match_hostname does not accept IP Address

2015-06-02 Thread Christian Heimes
Christian Heimes added the comment: The patch has a couple of issues 1) match_hostname()'s doc string needs to be updated. It still contains but IP addresses are not accepted for *hostname* 2) The stdlib uses server_hostname for SNI and matching. An IP address in the SNI TLS extension

[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-06-02 Thread Nick Coghlan
Nick Coghlan added the comment: Adding the --disable-pip-version-check option doesn't make the warning go away, and apparently the already passed --no-index flag is supposed to imply that one anyway: == --disable-pip-version-check Don't periodically check PyPI to

Re: Everything is an object in python - object class and type class

2015-06-02 Thread BartC
On 01/06/2015 23:59, BartC wrote: In the new class style, type and class sort of mean the same thing. I'm developing a new language along the lines of Python, (After reading some of the rest of the sub-thread, I'm glad I reined in some of the proposed changes to my existing language to

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Steven D'Aprano
On Tue, 2 Jun 2015 08:36 pm, Eddilbert Macharia wrote: you guys are just confusing me, you are going in loops, and still i have understood ,what makes everything in python an object. hey is where i'm at : *** type in python refers to data types e.g. int, str, boolean e.t.c. right ? Yes. Also

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Mark Lawrence
On 02/06/2015 11:36, Eddilbert Macharia wrote: you guys are just confusing me, you are going in loops, and still i have understood ,what makes everything in python an object. After 14 or more years writing Python I can't really answer that and quite frankly it doesn't worry me as I can

Re: for...else

2015-06-02 Thread Todd
I think there is essentially zero chance of that. My understanding is that Guido regrets having else to begin with. But this should work broken = True for x in it: if complicated_calculation_1(): break complicated_calculation_2() if complicated_calculation_3(): break

[issue16991] Add OrderedDict written in C

2015-06-02 Thread Stefan Krah
Stefan Krah added the comment: It's fine to open other issues, but I'm not happy with the resize()/get_index() situation. Currently I can't come up even with an informal proof that it'll always work (and see #24361). I think these functions really *need* 100% code coverage. --

Re: Knowledge Requirements for Machine Learning (SKLearn)

2015-06-02 Thread chrismeek4542
Thank you both. Just what i was looking for -- https://mail.python.org/mailman/listinfo/python-list

Re: for...else

2015-06-02 Thread Jean-Michel Pichavant
- Original Message - From: acdr mail.a...@gmail.com To: Jean-Michel Pichavant jeanmic...@sequans.com Cc: python-list@python.org Sent: Tuesday, 2 June, 2015 2:52:21 PM Subject: Re: for...else That would work for my example, but it would only really work if all the calculations are

Re: Python.exe has stopped working

2015-06-02 Thread Laura Creighton
In a message of Tue, 02 Jun 2015 06:09:34 -0700, Alexis Dubois writes: Hello ! I have this kind of message every time I quit my PyQt4 app whatever the method to quit is: a quit action menu, the windows red cross, by quit(), close(), destroy(), deletelater(), ... python.exe has stopped working

Re: Python.exe has stopped working

2015-06-02 Thread Alexis Dubois
On Tuesday, June 2, 2015 at 4:13:27 PM UTC+2, Laura Creighton wrote: In a message of Tue, 02 Jun 2015 06:09:34 -0700, Alexis Dubois writes: Hello ! I have this kind of message every time I quit my PyQt4 app whatever the method to quit is: a quit action menu, the windows red cross, by

[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-06-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset f39e9bcd789b by Donald Stufft in branch '3.5': Merge the fix for #24267 https://hg.python.org/cpython/rev/f39e9bcd789b New changeset 6dffea6134ad by Donald Stufft in branch 'default': Merge the fix for #24267

Re: Framework / CMS for Banking

2015-06-02 Thread Laura Creighton
In a message of Tue, 02 Jun 2015 05:41:31 -0700, Swapnil Bhadade writes: I am want to know which are the best CMS / framework for building web banking / Financial / lending services Best -- https://mail.python.org/mailman/listinfo/python-list See this video.

Re: fork/exec close file descriptors

2015-06-02 Thread Skip Montanaro
Reviving (and concluding) a thread I started a couple weeks ago, I asked: The basic fork/exec dance is not a problem, but how do I discover all the open file descriptors in the new child process to make sure they get closed? Do I simply start at fd 3 and call os.close() on everything up to

Re: for...else

2015-06-02 Thread Laura Creighton
You may be looking for dictionary dispatching. You can translate the key into a callable. def do_ping(self, arg): return 'Ping, {0}!'.format(arg) def do_pong(self, arg): return 'Pong, {0}!'.format(arg) dispatch = { 'ping': do_ping, 'pong': do_pong } and then at some

[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-06-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset aaa015dde686 by Donald Stufft in branch '3.4': Closes #24267 - Does not check version on ensurepip uninstall https://hg.python.org/cpython/rev/aaa015dde686 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed

Re: Knowledge Requirements for Machine Learning (SKLearn)

2015-06-02 Thread Fabien
On 06/02/2015 11:16 AM, chrismeek4...@gmail.com wrote: I would like to get into Machine learning. An Introduction to Statistical Learning: http://www-bcf.usc.edu/~gareth/ISL/ and corresponding MOOC. SKLearn and Statsmodels mailing lists: http://dir.gmane.org/gmane.comp.python.scikit-learn

for...else

2015-06-02 Thread acdr
Hi, Currently, in various places in my code, I have the equivalent of: for x in it: if complicated_calculation_1(): cleanup() break complicated_calculation_2() if complicated_calculation_3(): cleanup() break Obviously, I'm repeating myself by having

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Rustom Mody
On Tuesday, June 2, 2015 at 4:57:31 PM UTC+5:30, Steven D'Aprano wrote: On Tue, 2 Jun 2015 08:36 pm, Eddilbert Macharia wrote: you guys are just confusing me, you are going in loops, and still i have understood ,what makes everything in python an object. hey is where i'm at : *** type in

Re: for...else

2015-06-02 Thread acdr
The first solution in your e-mail (with a Cleanup exception) is definitely very close, functionally, to what I want to accomplish. In effect, it's the same structure as my original suggestion of for...then...else, except now it'd be try: for...else...except. That's workable. I can even cheat and

[issue16991] Add OrderedDict written in C

2015-06-02 Thread Eric Snow
Eric Snow added the comment: Addressing the concerns with resize()/get_index() is next on my list. I had meant to open up an issue on it last night but it was getting pretty late for me and it slipped my mind. I've opened issue24362 to track that work. --

[issue24362] Simplify the fast nodes resize logic in C OrderedDict.

2015-06-02 Thread Eric Snow
New submission from Eric Snow: Between comments on issue16991 and review comments there, it's clear that the implementation of _odict_resize and _odict_get_index in Objects/odictobject.c are too complicated to be a long-term solution. simplifying the approach to avoid recursion should help

Re: How to access the low digits of a list

2015-06-02 Thread Ian Kelly
On Tue, Jun 2, 2015 at 6:35 AM, Rustom Mody rustompm...@gmail.com wrote: For that matter even this works But I am not sure whats happening or that I like it [x[-2:] for x in lines] ['12', '42', '49', '56', '25', '36', '49', '64', '81', '00'] x[-2:] selects all items in the sequence with

How to access the low digits of a list

2015-06-02 Thread fl
Hi, I have a list: lines ['12', '42', '49', '156', '225', '36', '49', '164', '11181', '3100'] I want to access the last two digits. That is: ['12', '42', '49', '56', '25', '36', '49', '64', '81', '00'] When I try to use lines[3][0] is '1' lines[3][1] is '5' lines[3][2] is '6' I

Re: Everything is an object in python - object class and type class

2015-06-02 Thread BartC
On 02/06/2015 12:27, Steven D'Aprano wrote: Object has a general meaning in computer science and programming, it is a compound data structure that is explicitly linked to a type which provides functionality that operates on that data structure. In the programming language C, *no* values are

Re: for...else

2015-06-02 Thread Peter Otten
acdr wrote: Hi, Currently, in various places in my code, I have the equivalent of: for x in it: if complicated_calculation_1(): cleanup() break complicated_calculation_2() if complicated_calculation_3(): cleanup() break Obviously, I'm

Re: How to access the low digits of a list

2015-06-02 Thread Joel Goldstick
On Tue, Jun 2, 2015 at 8:23 AM, fl rxjw...@gmail.com wrote: Hi, I have a list: lines ['12', '42', '49', '156', '225', '36', '49', '164', '11181', '3100'] I want to access the last two digits. That is: ['12', '42', '49', '56', '25', '36', '49', '64', '81', '00'] When I try to

Re: How to access the low digits of a list

2015-06-02 Thread Rustom Mody
On Tuesday, June 2, 2015 at 5:53:34 PM UTC+5:30, fl wrote: Hi, I have a list: lines ['12', '42', '49', '156', '225', '36', '49', '164', '11181', '3100'] I want to access the last two digits. That is: ['12', '42', '49', '56', '25', '36', '49', '64', '81', '00']

Re: How to access the low digits of a list

2015-06-02 Thread Frank Stutzman
fl rxjw...@gmail.com wrote: ---snip lines ['12', '42', '49', '156', '225', '36', '49', '164', '11181', '3100'] I want to access the last two digits. That is: ['12', '42', '49', '56', '25', '36', '49', '64', '81', '00'] When I try to use lines[3][0] is '1' lines[3][1] is '5'

Re: for...else

2015-06-02 Thread Jean-Michel Pichavant
- Original Message - From: acdr mail.a...@gmail.com To: python-list@python.org Sent: Tuesday, 2 June, 2015 1:26:42 PM Subject: for...else Hi, Currently, in various places in my code, I have the equivalent of: for x in it: if complicated_calculation_1(): cleanup()

Framework / CMS for Banking

2015-06-02 Thread Swapnil Bhadade
I am want to know which are the best CMS / framework for building web banking / Financial / lending services Best -- https://mail.python.org/mailman/listinfo/python-list

[issue5319] stdout error at interpreter shutdown fails to return OS error status

2015-06-02 Thread Steve Dower
Steve Dower added the comment: Going from void to int is fine for when the return value is ignored. However, those who check the return value will see garbage on earlier versions. As always, safest to add a new function here. Or make the stable version continue to be void - it won't affect

Python.exe has stopped working

2015-06-02 Thread Alexis Dubois
Hello ! I have this kind of message every time I quit my PyQt4 app whatever the method to quit is: a quit action menu, the windows red cross, by quit(), close(), destroy(), deletelater(), ... python.exe has stopped working -Check online for a solution -Close the program I need to specify that

Re: Parser needed.

2015-06-02 Thread Grant Edwards
On 2015-06-02, Skybuck Flying skybuck2...@hotmail.com wrote: structure name { SomeField SomeData another structure name { SomeField SomeData } } IOW, it's almost, but not quite, JSON. -- Grant Edwards grant.b.edwardsYow! My vaseline is

Re: for...else

2015-06-02 Thread acdr
That would work for my example, but it would only really work if all the calculations are in a nice function. If I just have a block of code, then I can't use it as easily. (E.g. replace complicated_calculation_2() by multiple lines of code, which I don't want to shove into a separate function.)

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Marko Rauhamaa
BartC b...@freeuk.com: If you define 'object' in a certain way (eg. as boxed, tagged data), then it follows that some values don't need to be objects. The word object really barely carries any meaning -- that's the point. It's a Latin-based synonym of the Germanic thing. To say that

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Ian Kelly
On Mon, Jun 1, 2015 at 4:59 PM, BartC b...@freeuk.com wrote: I'm developing a new language along the lines of Python, perhaps a brief description of how things are done there might help. Or just give a different perspective. Objects in this language are tagged: there's a code attached to each

Re: How to access the low digits of a list

2015-06-02 Thread Steven D'Aprano
On Tue, 2 Jun 2015 10:23 pm, fl wrote: I don't know whether there is a way to know the length of lines[3]. The same way as to know the length of anything else: len(x) # the length of x len(hello) # the length of hello len(lines[3]) # the length of lines[3] Then, I can use a -1 step to

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Ian Cordasco
Ian Cordasco added the comment: Also I'm marking this as affecting 3.3, 3.4, and 3.5. I haven't tested against 3.5, but it definitely fails on 3.4. I hope to be able to test against 3.5.0b2 tonight -- versions: +Python 3.3, Python 3.4, Python 3.5

Re: fork/exec close file descriptors

2015-06-02 Thread Skip Montanaro
On Tue, Jun 2, 2015 at 10:28 AM, Marko Rauhamaa ma...@pacujo.net wrote: The only problem is that you don't know how high you need to go in general. Sure, but I didn't know anyway, so no matter what upper bound I choose (or what function I choose/implement), it's just going to be a guess.

[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-06-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 02d214716367 by Donald Stufft in branch '2.7': Issue #24267 - Ensure that pip version check is disabled on uninstall https://hg.python.org/cpython/rev/02d214716367 -- ___ Python tracker

Re: for...else

2015-06-02 Thread Jean-Michel Pichavant
- Original Message - From: acdr mail.a...@gmail.com To: Jean-Michel Pichavant jeanmic...@sequans.com Cc: python-list@python.org Sent: Tuesday, 2 June, 2015 4:00:12 PM Subject: Re: for...else The first solution in your e-mail (with a Cleanup exception) is definitely very close,

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Ian Cordasco
Ian Cordasco added the comment: FWIW, the proper section to reference now is 3.2 in RFC 7230 (https://tools.ietf.org/html/rfc7230#section-3.2) -- nosy: +icordasc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24363

Re: fork/exec close file descriptors

2015-06-02 Thread Marko Rauhamaa
Skip Montanaro skip.montan...@gmail.com: os.closerange(fd_low, fd_high) Close all file descriptors from fd_low (inclusive) to fd_high (exclusive), ignoring errors. Guido's time machine strikes again... The only problem is that you don't know how high you need to go in general.

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Michael Del Monte
New submission from Michael Del Monte: Initially reported at https://github.com/kennethreitz/requests/issues/2622 Closely related to http://bugs.python.org/issue19996 An HTTP response with an invalid header line that contains non-blank characters but *no* colon (contrast

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Steven D'Aprano
On Tue, 2 Jun 2015 09:40 pm, Rustom Mody wrote: On Tuesday, June 2, 2015 at 4:57:31 PM UTC+5:30, Steven D'Aprano wrote: On Tue, 2 Jun 2015 08:36 pm, Eddilbert Macharia wrote: [...] *** The instance of class type is a data type an instance of class type. right ? type(type) class 'type'

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread R. David Murray
R. David Murray added the comment: The current behavior probably comes out of the RFC822 world, where when seeing a line that doesn't look like a header the error recovery is to treat that line as the beginning of the body (ie: assume the blank line is missing). Is there in fact any guidance

Re: Framework / CMS for Banking

2015-06-02 Thread Laura Creighton
In a message of Tue, 02 Jun 2015 21:09:48 +0530, Swapnil writes: Respected: Thanks. Would you mind if , i ask you more detail Q’s on the framework. If not then any resources where i can i ask more Q’s ? Best Dr. Swapnil Bhadade You can ask more questions here. I just remembered that there

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Rustom Mody
On Tuesday, June 2, 2015 at 8:38:42 PM UTC+5:30, Steven D'Aprano wrote: On Tue, 2 Jun 2015 09:40 pm, Rustom Mody wrote: On Tuesday, June 2, 2015 at 4:57:31 PM UTC+5:30, Steven D'Aprano wrote: On Tue, 2 Jun 2015 08:36 pm, Eddilbert Macharia wrote: [...] *** The instance of class type is

[issue24364] Not all defects pass through email policy

2015-06-02 Thread R. David Murray
New submission from R. David Murray: This is a note to myself. While looking at another issue I noticed that I never completed the work to make sure that all message defects discovered by feedparser are passed through the policy defect handler. The fix is simple, the time consuming part is

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Michael Del Monte
Michael Del Monte added the comment: Thanks. Also I meant to have said, ...to terminate only on a *blank* non-header non-comment line, in accordance with RFC 2616 (and 7230). I note that the RFCs require CRLF to terminate but in my experience you can get all manner of blank lines, so

Re: Framework / CMS for Banking

2015-06-02 Thread Swapnil
Respected: Thanks. Would you mind if , i ask you more detail Q’s on the framework. If not then any resources where i can i ask more Q’s ? Best Dr. Swapnil Bhadade M.B.B.S M.S Yindu (India) swapnilrbhadad...@gmail.com. ……….. Please

Re: fork/exec close file descriptors

2015-06-02 Thread Alain Ketterlin
Skip Montanaro skip.montan...@gmail.com writes: Reviving (and concluding) a thread I started a couple weeks ago, I asked: The basic fork/exec dance is not a problem, but how do I discover all the open file descriptors in the new child process to make sure they get closed? Do I simply start

[issue23078] unittest.mock patch autospec doesn't work on staticmethods

2015-06-02 Thread Felipe
Felipe added the comment: Regarding Claudiu's comment about `staticmethod(x)` or `classmethod(x)` not being callable, would it suffice to add a specific check of the form `(isinstance(x, (classmethod, staticmethod)) and _callable(x.__func__))`? Separately, would it be better to include the

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- components: +email keywords: +easy nosy: +barry stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24363 ___

[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread R. David Murray
R. David Murray added the comment: Ah, in fact that's exactly where it comes from, since httplib uses the email header parsing code. In python3 we are actually using the email package to parse the headers (which is sensible) (in 2.7 it is a copy of code from the old mimelib with some

Re: fork/exec close file descriptors

2015-06-02 Thread Jon Ribbens
On 2015-06-02, Marko Rauhamaa ma...@pacujo.net wrote: Skip Montanaro skip.montan...@gmail.com: On Tue, Jun 2, 2015 at 10:28 AM, Marko Rauhamaa ma...@pacujo.net wrote: The only problem is that you don't know how high you need to go in general. Sure, but I didn't know anyway, so no matter

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Terry Reedy
On 6/2/2015 6:36 AM, Eddilbert Macharia wrote: you guys are just confusing me, you are going in loops, Ignore the troll who is trying to confuse you by slandering the rest of us. I have been using python for 18 years, I believe. Current Python has a loop at the core isinstance(type,

Re: fork/exec close file descriptors

2015-06-02 Thread Marko Rauhamaa
Skip Montanaro skip.montan...@gmail.com: On Tue, Jun 2, 2015 at 10:28 AM, Marko Rauhamaa ma...@pacujo.net wrote: The only problem is that you don't know how high you need to go in general. Sure, but I didn't know anyway, so no matter what upper bound I choose (or what function I

Re: Parser needed.

2015-06-02 Thread MRAB
On 2015-06-02 05:45, Skybuck Flying wrote: Example for python: MyString = Hello World print MyString.rfind(World) if MyString.rfind(World): print yes else: print no Pretty cool. .rfind returns the index if found, -1 if not found. World.rfind(World) returns 0, which will be treated as

Find in ipython3

2015-06-02 Thread Cecil Westerhof
I am thinking about using ipython3 instead of bash. When I want to find a file I can do the following: !find ~ -iname '*python*.pdf' but is there a python way? -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof --

Re: What use of string module?

2015-06-02 Thread Tim Chase
On 2015-06-02 04:37, Mark Lawrence wrote: I read the online help about string. It lists string constants, string formatting, template strings and string functions. After reading these, I am still puzzled about how to use the string module. I suggest you don't bother, it's effectively

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Steven D'Aprano
On Tue, 2 Jun 2015 10:49 pm, BartC wrote: On 02/06/2015 12:27, Steven D'Aprano wrote: Object has a general meaning in computer science and programming, it is a compound data structure that is explicitly linked to a type which provides functionality that operates on that data structure. In

Re: should self be changed?

2015-06-02 Thread Steven D'Aprano
On Fri, 29 May 2015 12:00 pm, Steven D'Aprano wrote: [...] in a language where classes are themselves values, there is no reason why a class must be instantiated, particularly if you're only using a single instance of the class. Anyone ever come across a named design pattern that involves

Re: Parser needed.

2015-06-02 Thread Skybuck Flying
MRAB wrote in message news:mailman.71.1433263397.13271.python-l...@python.org... On 2015-06-02 05:45, Skybuck Flying wrote: Example for python: MyString = Hello World print MyString.rfind(World) if MyString.rfind(World): print yes else: print no Pretty cool. .rfind returns the index

Re: should self be changed?

2015-06-02 Thread Marko Rauhamaa
Steven D'Aprano st...@pearwood.info: On Fri, 29 May 2015 12:00 pm, Steven D'Aprano wrote: [...] in a language where classes are themselves values, there is no reason why a class must be instantiated, particularly if you're only using a single instance of the class. Anyone ever come across

[issue24266] raw_input + readline: Ctrl+C during search breaks readline

2015-06-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: The patch is two lines, but I do not know our general policy for working around bugs in external modules. I do know that Idle has workarounds for tk bugs (or 'os-dependencies'). -- ___ Python tracker

[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-06-02 Thread Eric Snow
Eric Snow added the comment: https://hg.python.org/cpython/rev/5c4ba50f6a57 I'll see if that does it. @Larry, would you be opposed to dropping the hack for beta 3? That would mean just deleting the last 2 lines in Lib/importlib/_bootstrap_external.py. --

[issue24266] raw_input + readline: Ctrl+C during search breaks readline

2015-06-02 Thread R. David Murray
R. David Murray added the comment: I believe that in general we do do workarounds if they don't make the code too complicated and upstream hasn't solved the problem (or we need to support older upstream versions). -- nosy: +r.david.murray ___

Create Web app on Win and run on Win or Mac

2015-06-02 Thread Bret Edwards via Python-list
I took a look at Ren'Py as suggested by a reply to my previous post entitled Create on Win and run on Win or Mac. Thanks for your suggestion. Ren'Py looks pretty amazing! Not sure that is a good route since my primary reason for this endeavor is learning Python scripting (secondarily to create

[issue24360] improve argparse.Namespace __repr__ for invalid identifiers.

2015-06-02 Thread Matthias Bussonnier
New submission from Matthias Bussonnier: The argparse Namespace can be missleading in case where the args names are not valid identifiers, eg thinks like a closing bracket: In [5]: Namespace(a=1, **{')':3}) Out[5]: Namespace()=3, a=1) more funny: In [3]: Namespace(a=1, **{s:3}) Out[3]:

[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-06-02 Thread Ned Deily
Ned Deily added the comment: All of the 3.x buildbots are broken again due to the pip 7.0.3 update. == FAIL: test_with_pip (test.test_venv.EnsurePipTest) --

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Steven D'Aprano
On Tuesday 02 June 2015 11:15, TheDoctor wrote: A type is not an object. Yes it is. py isinstance(type, object) True py isinstance(int, object) True You see it as one, because you are MENTALLY lexing your own code on the screen. No, I see it as one, because it is one. But python does

Re: Everything is an object in python - object class and type class

2015-06-02 Thread Steven D'Aprano
On Tuesday 02 June 2015 11:02, TheDoctor wrote: On Monday, June 1, 2015 at 7:33:11 PM UTC-5, Chris Angelico wrote: On Tue, Jun 2, 2015 at 10:24 AM, TheDoctor dreamingforw...@gmail.com wrote: A type is not an object in the same way an instantiated type is an object -- anymore than a

[issue24308] Test failure: test_with_pip (test.test_venv.EnsurePipTest in 3.x

2015-06-02 Thread Ned Deily
Ned Deily added the comment: This is covered by Issue24267; let's track it there. -- nosy: +ned.deily resolution: - duplicate stage: - resolved status: open - closed superseder: - test_venv.EnsurePipTest.test_with_pip triggers version check over network

Religion [was Re: Everything is an object in python - object class and type class]

2015-06-02 Thread Steven D'Aprano
On Tuesday 02 June 2015 15:01, Rustom Mody wrote: eg Would it make sense to you if you were told that there are widespread religions like Buddhism that are agnostic or Jainism that are strictly atheistic? No of course it wouldn't make sense. But nothing to do with religion, spirituality and

Re: Religion [was Re: Everything is an object in python - object class and type class]

2015-06-02 Thread Mark Lawrence
On 02/06/2015 07:04, Steven D'Aprano wrote: On Tuesday 02 June 2015 15:01, Rustom Mody wrote: eg Would it make sense to you if you were told that there are widespread religions like Buddhism that are agnostic or Jainism that are strictly atheistic? No of course it wouldn't make sense. But

Re: Religion [was Re: Everything is an object in python - object class and type class]

2015-06-02 Thread Rustom Mody
On Tuesday, June 2, 2015 at 11:34:34 AM UTC+5:30, Steven D'Aprano wrote: On Tuesday 02 June 2015 15:01, Rustom Mody wrote: eg Would it make sense to you if you were told that there are widespread religions like Buddhism that are agnostic or Jainism that are strictly atheistic? No of

Re: Create Web app on Win and run on Win or Mac

2015-06-02 Thread Mark Lawrence
On 02/06/2015 06:51, Bret Edwards via Python-list wrote: I took a look at Ren'Py as suggested by a reply to my previous post entitled Create on Win and run on Win or Mac. Thanks for your suggestion. Ren'Py looks pretty amazing! Not sure that is a good route since my primary reason for this

<    1   2