DerbyPy Meetup, Louisville area, this Thursday at 6:30

2014-08-11 Thread Randy Syring
I've started a meetup for Python in the Louisville, KY area. Come check us out: http://www.meetup.com/derbypy/ *Randy Syring* Husband | Father | Redeemed Sinner /For what does it profit a man to gain the whole world and forfeit his soul? (Mark 8:36 ESV)/ --

Re: What's the future of perfect Python?

2014-08-11 Thread Terry Reedy
On 8/11/2014 1:15 AM, 13813962782 wrote: Java is belonging to Oracle, C++ is defined by ISO; Python is designed by great Guido van Rossum http://en.wikipedia.org/wiki/Guido_van_Rossum; Python is owned, as in copyright and trademark, by the Python Software Foundation, a US non-profit

Re: how to get the ordinal number in list

2014-08-11 Thread Rustom Mody
On Monday, August 11, 2014 11:16:25 AM UTC+5:30, Chris Angelico wrote: On Mon, Aug 11, 2014 at 3:23 PM, Rustom Mody wrote: A C programmer asked to swap variables x and y, typically writes something like t = x; x = y; y = t; Fine, since C cant do better. But then he assumes that that

Re: Template language for random string generation

2014-08-11 Thread Devin Jeanpierre
On Sun, Aug 10, 2014 at 7:22 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Devin Jeanpierre wrote: On Sun, Aug 10, 2014 at 9:31 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I don't think that using a good, but not cryptographically-strong, random number

Is print thread safe?

2014-08-11 Thread Steven D'Aprano
Specifically for Python 2.6 and 2.7, but answers for 3.x appreciated as well. Is print thread safe? That is, if I have two threads that each call print, say: print spam spam spam # thread 1 print eggs eggs eggs # thread 2 I don't care which line prints first, but I do care if the two lines

Re: Template language for random string generation

2014-08-11 Thread Mark Lawrence
On 11/08/2014 06:06, Paul Wolf wrote: I'm pleased to see that you have answers. In return would you please read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing and single line paragraphs, thanks. -- My fellow Pythonistas, ask not what

Re: how to get the ordinal number in list

2014-08-11 Thread Steven D'Aprano
On Sun, 10 Aug 2014 23:22:45 -0700, Rustom Mody wrote: You think that the '=' sign not standing for math equality is ok. How come? For the same reason that in the following: [c.upper() for c in some_string if 'a' c 'x'] having the c symbol not stand for the speed of light is okay.

Re: What's the future of perfect Python?

2014-08-11 Thread Steven D'Aprano
On Mon, 11 Aug 2014 13:15:19 +0800, 13813962782 wrote: Just like MANY people, I was one of guys who do very like Python. But there's one thing always puzzled me, could you kindly help give some words about it: Java is belonging to Oracle, C++ is defined by ISO Python is designed by great

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-11 Thread Wolfgang Keller
Thankfully, all actually user-friendly operating systems (MacOS, TOS, RiscOS, probably AmigaOS, MacOS X) spare(d) their users the bottomless cesspit of package management and/or installers. Because on such operating systems, each and every application is an entirely

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-11 Thread Wolfgang Keller
Linux was made by geeks who didn't have a clue of ergonomics for screenworkers and didn't care to get one. I can only repeat what you said earlier: You should get a clue in stead [sic] of just fantasizing up assumptions based on ignorance. I daresay that Linus Torvalds spends more

Re: how to get the ordinal number in list

2014-08-11 Thread Chris Angelico
On Mon, Aug 11, 2014 at 6:55 PM, Steven D'Aprano st...@pearwood.info wrote: On Sun, 10 Aug 2014 23:22:45 -0700, Rustom Mody wrote: You think that the '=' sign not standing for math equality is ok. How come? For the same reason that in the following: [c.upper() for c in some_string if 'a'

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-11 Thread alister
On Mon, 11 Aug 2014 11:08:43 +0200, Wolfgang Keller wrote: By the way, you keep replying to people, and quoting them, but deleting their name. Please leave the attribution in place, so we know who you are replying to. That's what the References:-Header is there for. Sincerely,

Re: how to get the ordinal number in list

2014-08-11 Thread Marko Rauhamaa
Rustom Mody rustompm...@gmail.com: You think that the '=' sign not standing for math equality is ok. How come? Python is a formal language with a well-defined syntax and reasonably well-understood semantics. That's all that matters. Any resemblance to the much more ad-hoc syntax of classical

Re: how to get the ordinal number in list

2014-08-11 Thread Steven D'Aprano
On Sun, 10 Aug 2014 22:23:18 -0700, Rustom Mody wrote: A C programmer asked to swap variables x and y, typically writes something like t = x; x = y; y = t; Fine, since C cant do better. But then he assumes that that much sequentialization is inherent to the problem... Until he sees the

Re: how to get the ordinal number in list

2014-08-11 Thread Chris Angelico
On Mon, Aug 11, 2014 at 7:35 PM, Marko Rauhamaa ma...@pacujo.net wrote: Python is a formal language with a well-defined syntax and reasonably well-understood semantics. That's all that matters. Any resemblance to the much more ad-hoc syntax of classical mathematics is almost coincidental.

Re: how to get the ordinal number in list

2014-08-11 Thread Chris Angelico
On Mon, Aug 11, 2014 at 7:44 PM, Steven D'Aprano st...@pearwood.info wrote: And even when you can parallelize a series of tasks, it's ... easy for one task to get aborted part way while the rest of the tasks continue on, oblivious to the absence of the rest of that sentence? ChrisA --

Re: how to get the ordinal number in list

2014-08-11 Thread Chris Angelico
On Mon, Aug 11, 2014 at 7:44 PM, Steven D'Aprano st...@pearwood.info wrote: I think this is why both declarative and functional programming idioms will remain niche (although important niches). Most tasks are inherently imperative to at least some degree, and often a *great* degree. Maybe

Re: Is print thread safe?

2014-08-11 Thread INADA Naoki
On Python 3, print is thread safe. But Python 2 has broken scenario: print spam, spam, spam # thread 1 print eggs, eggs, eggs # thread 2 In this case, 2 lines are mixed. In your case, spam spam spam and eggs eggs eggs are not mixed. But newline is mixed like: spam spam spameggs eggs eggs

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-11 Thread Chris Angelico
On Mon, Aug 11, 2014 at 7:37 PM, alister alister.nospam.w...@ntlworld.com wrote: On Mon, 11 Aug 2014 11:08:43 +0200, Wolfgang Keller wrote: By the way, you keep replying to people, and quoting them, but deleting their name. Please leave the attribution in place, so we know who you are

Re: how to get the ordinal number in list

2014-08-11 Thread Steven D'Aprano
On Sun, 10 Aug 2014 21:29:12 -0700, Rustom Mody wrote: On Monday, August 11, 2014 8:30:32 AM UTC+5:30, Steven D'Aprano wrote: You did the same thing in your own course, the only difference being you accepted a different set of primitive functions. But ultimately you have to introduce *some*

Re: how to get the ordinal number in list

2014-08-11 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: On Mon, Aug 11, 2014 at 7:35 PM, Marko Rauhamaa ma...@pacujo.net wrote: Python is a formal language with a well-defined syntax and reasonably well-understood semantics. That's all that matters. Any resemblance to the much more ad-hoc syntax of classical

Re: how to get the ordinal number in list

2014-08-11 Thread Chris Angelico
On Mon, Aug 11, 2014 at 8:46 PM, Marko Rauhamaa ma...@pacujo.net wrote: The main thing is that the definitions must be clear. I must be able to look up the precise description quickly, and in fact, I always have the Python Library Reference in a browser tab or two because I have to review even

Re: how to get the ordinal number in list

2014-08-11 Thread Steven D'Aprano
Chris Angelico wrote: On Mon, Aug 11, 2014 at 7:44 PM, Steven D'Aprano st...@pearwood.info wrote: And even when you can parallelize a series of tasks, it's ... easy for one task to get aborted part way while the rest of the tasks continue on, oblivious to the absence of the rest of that

Re: how to get the ordinal number in list

2014-08-11 Thread Rustom Mody
On Monday, August 11, 2014 3:58:59 PM UTC+5:30, Steven D'Aprano wrote: On Sun, 10 Aug 2014 21:29:12 -0700, Rustom Mody wrote: On Monday, August 11, 2014 8:30:32 AM UTC+5:30, Steven D'Aprano wrote: You did the same thing in your own course, the only difference being you accepted a different

Re: how to get the ordinal number in list

2014-08-11 Thread Robert Kern
On 2014-08-11 03:04, Steven D'Aprano wrote: Rustom Mody wrote: Its when we have variables that are assigned in multiple places that we start seeing mathematical abominations like x = x+1 That's not a mathematical abomination. It's a perfectly reasonable mathematical equation, one with no

Re: how to get the ordinal number in list

2014-08-11 Thread Roy Smith
In article b3c69a72-5f0c-4e2a-8ef0-91842e12c...@googlegroups.com, Rustom Mody rustompm...@gmail.com wrote: A C programmer asked to swap variables x and y, typically writes something like t = x; x = y; y = t; Fine, since C cant do better. Sure C can do better. x = x ^ y y = y ^ x x = x

Re: how to get the ordinal number in list

2014-08-11 Thread Rustom Mody
Having it both ways aren't you? On the one hand you say On Monday, August 11, 2014 3:21:35 PM UTC+5:30, Chris Angelico wrote: On Mon, Aug 11, 2014 at 7:35 PM, Marko Rauhamaa wrote: Python is a formal language with a well-defined syntax and reasonably well-understood semantics. That's all

Re: how to get the ordinal number in list

2014-08-11 Thread Tim Chase
On 2014-08-11 07:55, Roy Smith wrote: A C programmer asked to swap variables x and y, typically writes something like t = x; x = y; y = t; Fine, since C cant do better. Sure C can do better. x = x ^ y y = y ^ x x = x ^ y Any self-respecting C hacker would write it this

Re: how to get the ordinal number in list

2014-08-11 Thread alister
On Mon, 11 Aug 2014 12:56:59 +0100, Robert Kern wrote: On 2014-08-11 03:04, Steven D'Aprano wrote: Rustom Mody wrote: Its when we have variables that are assigned in multiple places that we start seeing mathematical abominations like x = x+1 That's not a mathematical abomination. It's a

Re: how to get the ordinal number in list

2014-08-11 Thread Marko Rauhamaa
alister alister.nospam.w...@ntlworld.com: It already is a different operator from equality which is == perhaps it would have been better if the behaviour of these two operators were reversed (= for equality == for assignment) but i suspect that Idea if even considered was quickly discarded

Re: how to get the ordinal number in list

2014-08-11 Thread Chris Angelico
On Mon, Aug 11, 2014 at 10:11 PM, Rustom Mody rustompm...@gmail.com wrote: So evidently using notations in the ways they are conventionally used is a good thing. But then when it comes to Steven supporting the violation 500 years* of math conventional usage of '=': Yep. It's not a violation;

Re: how to get the ordinal number in list

2014-08-11 Thread Marko Rauhamaa
Tim Chase python.l...@tim.thechases.com: Pish, such redundancy...everyone knows a C programmer would write that as x ^= y y ^= x x ^= y Aren't you forgetting something? Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: how to get the ordinal number in list

2014-08-11 Thread Chris Angelico
On Mon, Aug 11, 2014 at 10:41 PM, Marko Rauhamaa ma...@pacujo.net wrote: Tim Chase python.l...@tim.thechases.com: Pish, such redundancy...everyone knows a C programmer would write that as x ^= y y ^= x x ^= y Aren't you forgetting something? I don't think he is. Those are augmented

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-11 Thread Mark Lawrence
On 11/08/2014 10:08, Wolfgang Keller wrote: By the way, you keep replying to people, and quoting them, but deleting their name. Please leave the attribution in place, so we know who you are replying to. That's what the References:-Header is there for. Sincerely, Wolfgang The references

Re: What's the future of perfect Python?

2014-08-11 Thread Mark Lawrence
On 11/08/2014 10:04, Steven D'Aprano wrote: On Mon, 11 Aug 2014 13:15:19 +0800, 13813962782 wrote: Just like MANY people, I was one of guys who do very like Python. But there's one thing always puzzled me, could you kindly help give some words about it: Java is belonging to Oracle, C++ is

Re: how to get the ordinal number in list

2014-08-11 Thread Mark Lawrence
On 11/08/2014 13:30, Tim Chase wrote: On 2014-08-11 07:55, Roy Smith wrote: A C programmer asked to swap variables x and y, typically writes something like t = x; x = y; y = t; Fine, since C cant do better. Sure C can do better. x = x ^ y y = y ^ x x = x ^ y Any self-respecting C hacker

Re: how to get the ordinal number in list

2014-08-11 Thread Mark Lawrence
On 11/08/2014 13:11, Rustom Mody wrote: But then when it comes to Steven supporting the violation 500 years* of math conventional usage of '=': I have no interest in the maths convention (see, you don't even know the original, correct English, math indeed). Of far more importance in the

Re: attendance system in pybluez

2014-08-11 Thread Michael Torrie
On 08/09/2014 09:07 PM, luofeiyu wrote: in the http://homepages.ius.edu/rwisman/C490/html/PythonandBluetooth.htm *Discovery* That only works for phones if the phones are manually switched to discoverable mode, which is off by default for security reasons. By default they are not going to

Re: how to get the ordinal number in list

2014-08-11 Thread Robin Becker
On 11/08/2014 13:30, alister wrote: It already is a different operator from equality which is == perhaps it would have been better if the behaviour of these two operators were reversed (= for equality == for assignment) but i suspect that Idea if even considered was quickly discarded as it

Nuitka Release 0.5.4

2014-08-11 Thread Mark Lawrence
To me rather more interesting than discussing the relative merits of '=' compared to '==', '=' or ':='. See here http://nuitka.net/posts/nuitka-release-054.html -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --

Re: Is print thread safe?

2014-08-11 Thread Steven D'Aprano
INADA Naoki wrote: On Python 3, print is thread safe. But Python 2 has broken scenario: Is this documented somewhere? -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-11 Thread Grant Edwards
On 2014-08-06, Wolfgang Keller felip...@gmx.net wrote: Because on such operating systems, each and every application is an entirely self-contained package that doesn't need any packages or installers to use it. For people who have never used such a system it's probably difficult to see

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-11 Thread Grant Edwards
On 2014-08-11, Wolfgang Keller felip...@gmx.net wrote: [somebody, but we don't know who, wrote]... By the way, you keep replying to people, and quoting them, but deleting their name. Please leave the attribution in place, so we know who you are replying to. That's what the

Linux distros w/o Python in base installation

2014-08-11 Thread Grant Edwards
I just installed Arch Linux for the first time, and was surprosed to find that Python isn't installed as part of a base system. It's also not included in the 'base-devel' package group. It's trivial to install, but I'd still pretty surprised it's not there by default. I guess I've spent too

Re: Linux distros w/o Python in base installation

2014-08-11 Thread Chris Rebert
On Mon, Aug 11, 2014 at 11:53 AM, Grant Edwards invalid@invalid.invalid wrote: I just installed Arch Linux for the first time, and was surprosed to find that Python isn't installed as part of a base system. It's also not included in the 'base-devel' package group. It's trivial to install,

Re: Linux distros w/o Python in base installation

2014-08-11 Thread Grant Edwards
On 2014-08-11, Chris Rebert c...@rebertia.com wrote: On Mon, Aug 11, 2014 at 11:53 AM, Grant Edwards invalid@invalid.invalid wrote: I just installed Arch Linux for the first time, and was surprosed to find that Python isn't installed as part of a base system. It's also not included in the

Python Object Systems

2014-08-11 Thread thequietcenter
(Cross-posted from http://www.reddit.com/r/Python/comments/2d9f7i/survey_of_python_object_systems/) Hello, has anyone created a survey of Python Object Systems? The two I am aware of are: - elk https://github.com/frasertweedale/elk - Traits http://code.enthought.com/projects/traits/ --

Re: Python Object Systems

2014-08-11 Thread Skip Montanaro
On Mon, Aug 11, 2014 at 3:26 PM, thequietcen...@gmail.com wrote: has anyone created a survey of Python Object Systems? For the uninitiated, can you back up a step and define what you mean by an object system? The term seems kind of broad for Google ( number of hits for CLOS, etc), and Wikipedia

Re: Python Object Systems

2014-08-11 Thread thequietcenter
On Monday, August 11, 2014 4:37:29 PM UTC-4, Skip Montanaro wrote: On Mon, Aug 11, 2014 at 3:26 PM, thequietcen...@gmail.com wrote: has anyone created a survey of Python Object Systems? For the uninitiated, can you back up a step and define what you mean by an object system? I

Re: Python Object Systems

2014-08-11 Thread Marko Rauhamaa
Skip Montanaro s...@pobox.com: On Mon, Aug 11, 2014 at 3:26 PM, thequietcen...@gmail.com wrote: has anyone created a survey of Python Object Systems? For the uninitiated, can you back up a step and define what you mean by an object system? Elk and Traits implement a C++-style object model

Re: Python Object Systems

2014-08-11 Thread thequietcenter
On Monday, August 11, 2014 5:09:35 PM UTC-4, Marko Rauhamaa wrote: Elk and Traits implement a C++-style object model on top of Python. The systems enforce member access, type constraints etc and result in ugly code that barely looks like Python. I personally get tired of manually

Re: Linux distros w/o Python in base installation

2014-08-11 Thread Ned Deily
In article lsb84u$21c$1...@reader1.panix.com, Grant Edwards invalid@invalid.invalid wrote: Apparently. Perhaps theres an enable LSB compliance option somewhere in the Arch install docs, but I didn't see it... Also beware that, unlike most other distributions and contrary to recommended

Re: Python Object Systems

2014-08-11 Thread Mark Lawrence
On 11/08/2014 22:26, thequietcen...@gmail.com wrote: On Monday, August 11, 2014 5:09:35 PM UTC-4, Marko Rauhamaa wrote: Elk and Traits implement a C++-style object model on top of Python. The systems enforce member access, type constraints etc and result in ugly code that barely looks like

Re: Python Object Systems

2014-08-11 Thread Marko Rauhamaa
thequietcen...@gmail.com: I personally get tired of manually assigning attributes in a __init__() method. It's not all that bad. Just do it. Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: how to get the ordinal number in list

2014-08-11 Thread Terry Reedy
On 11/08/2014 13:30, alister wrote: It already is a different operator from equality which is == Mathematicians use '=' for name binding all the time, with and without 'let': Let u = x + y, v = x - y. Then ... . However, name binding itself is a mental operation, not a mathematical one.

Re: Keep one GUI always on TOP while python code is running

2014-08-11 Thread Grant Edwards
On 2014-08-07, Jaydeep Patil patil.jay2...@gmail.com wrote: I have one query. I have did some programming which copies and paste data using system clipboard. I need to keep one GUI always on top till my python code is running. If you mean keep it on top while it is running, the answer is

Re: Keep one GUI always on TOP while python code is running

2014-08-11 Thread Grant Edwards
On 2014-08-08, Chris Angelico ros...@gmail.com wrote: On Fri, Aug 8, 2014 at 11:58 PM, Steven D'Aprano Why should that disable access to everything else? Most full screen games let you alt-tab away from them (preferably auto-pausing the game). If a game goes system modal on me, I would not be

Re: Is print thread safe?

2014-08-11 Thread Cameron Simpson
On 12Aug2014 02:07, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: INADA Naoki wrote: On Python 3, print is thread safe. But Python 2 has broken scenario: Is this documented somewhere? In python/2.7.6/reference/simple_stmts.html#index-22, print is described in terms of a

Re: converting ISO8601 date and time string representations to datetime

2014-08-11 Thread Mark Lawrence
On 31/07/2014 10:11, Wolfgang Maier wrote: Hi, I'm trying to convert ISO8601-compliant strings representing dates or dates and times into datetime.datetime objects. I tried using the strptime method, but the problem here is that I can only specify one format argument, which can be used to parse

Re: how to write file into my android phone?

2014-08-11 Thread Grant Edwards
On 2014-08-10, Marko Rauhamaa ma...@pacujo.net wrote: Christian Gollwitzer aurio...@gmx.de: Am 10.08.14 11:39, schrieb Steven D'Aprano: Android phones don't mount as storage devices? Oh well, that's Android crossed off my list. Not any longer. They used to, but the support for mass storage

Re: converting ISO8601 date and time string representations to datetime

2014-08-11 Thread Mark Lawrence
On 06/08/2014 20:05, Skip Montanaro wrote: On Wed, Aug 6, 2014 at 1:31 PM, Joel Goldstick joel.goldst...@gmail.com wrote: Among other features it lists this: Gaps in functionality: ISO-8601 parsing, timespans, humanization What is humanization? Skip Presumably as in

Re: Python Object Systems

2014-08-11 Thread Mike C. Fletcher
On 14-08-11 04:26 PM, thequietcen...@gmail.com wrote: ... Hello, has anyone created a survey of Python Object Systems? The two I am aware of are: - elk https://github.com/frasertweedale/elk - Traits http://code.enthought.com/projects/traits/ Here's the ones from my talk at Pycon 2005

Re: how to get the ordinal number in list

2014-08-11 Thread Chris Angelico
On Tue, Aug 12, 2014 at 12:32 AM, Robin Becker ro...@reportlab.com wrote: Of course Python can be even more confusing so that for example class NeverEqual(int): ... def __new__(cls,v): ... self = int.__new__(cls,v) ... return self ... def __eq__(self,other):

Re: Linux distros w/o Python in base installation

2014-08-11 Thread Chris Angelico
On Tue, Aug 12, 2014 at 7:36 AM, Ned Deily n...@acm.org wrote: In article lsb84u$21c$1...@reader1.panix.com, Grant Edwards invalid@invalid.invalid wrote: Apparently. Perhaps theres an enable LSB compliance option somewhere in the Arch install docs, but I didn't see it... Also beware that,

Re: Is print thread safe?

2014-08-11 Thread Steven D'Aprano
Cameron Simpson wrote: On 12Aug2014 02:07, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: INADA Naoki wrote: On Python 3, print is thread safe. But Python 2 has broken scenario: Is this documented somewhere? In python/2.7.6/reference/simple_stmts.html#index-22, print is

Re: Is print thread safe?

2014-08-11 Thread Chris Angelico
On Tue, Aug 12, 2014 at 9:56 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: from __future__ import print_function _print = print _rlock = threading.RLock() def print(*args, **kwargs): with _rlock: _print(*args, **kwargs) You're conflating print and stdout here.

Re: Python and IDEs [was Re: Python 3 is killing Python]

2014-08-11 Thread Steven D'Aprano
Wolfgang Keller wrote: By the way, you keep replying to people, and quoting them, but deleting their name. Please leave the attribution in place, so we know who you are replying to. That's what the References:-Header is there for. The References header is for the benefit of news and mail

Re: Quoting and attribution (was: Python and IDEs [was Re: Python 3 is killing Python])

2014-08-11 Thread Tim Chase
On 2014-08-12 10:11, Steven D'Aprano wrote: It is rude to deliberately refuse to give attributes While I find this true for first-level attribution, I feel far less obligation to attribute additional levels (and the verbosity they entail). If the reader is really that interested in who said

Re: Quoting and attribution (was: Python and IDEs [was Re: Python 3 is killing Python])

2014-08-11 Thread Steven D'Aprano
On Mon, 11 Aug 2014 19:27:25 -0500, Tim Chase wrote: On 2014-08-12 10:11, Steven D'Aprano wrote: It is rude to deliberately refuse to give attributes While I find this true for first-level attribution, I feel far less obligation to attribute additional levels (and the verbosity they

Re: Quoting and attribution (was: Python and IDEs [was Re: Python 3 is killing Python])

2014-08-11 Thread Chris Angelico
On Tue, Aug 12, 2014 at 12:07 PM, Steven D'Aprano st...@pearwood.info wrote: I cannot disagree with that. I consider that the first-level attribution MUST be given, second-level SHOULD be given, and third- and subsequent levels MAY be given, where MUST/SHOULD/MAY have their conventional

Re: Quoting and attribution (was: Python and IDEs [was Re: Python 3 is killing Python])

2014-08-11 Thread Tim Chase
On 2014-08-12 02:07, Steven D'Aprano wrote: It is rude to deliberately refuse to give attributes While I find this true for first-level attribution, I feel far less obligation to attribute additional levels (and the verbosity they entail). I cannot disagree with that. I consider

Re: Linux distros w/o Python in base installation

2014-08-11 Thread Grant Edwards
On 2014-08-11, Chris Angelico ros...@gmail.com wrote: On Tue, Aug 12, 2014 at 7:36 AM, Ned Deily n...@acm.org wrote: In article lsb84u$21c$1...@reader1.panix.com, Grant Edwards invalid@invalid.invalid wrote: Apparently. Perhaps theres an enable LSB compliance option somewhere in the Arch

Re: Linux distros w/o Python in base installation

2014-08-11 Thread Rustom Mody
On Tuesday, August 12, 2014 12:23:57 AM UTC+5:30, Grant Edwards wrote: I just installed Arch Linux for the first time, and was surprosed to find that Python isn't installed as part of a base system. It's also not included in the 'base-devel' package group. It's trivial to install, but I'd

Re: Is print thread safe?

2014-08-11 Thread Marko Rauhamaa
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: Personally, I believe that print ought to do its own locking. And print is a statement, although in this case there's no need to support anything older than 2.6, so something like this ought to work: from __future__ import print_function

[issue21514] update json module docs in light of RFC 7159 ECMA-404

2014-08-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Soonish. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21514 ___ ___ Python-bugs-list mailing list

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-08-11 Thread Matej Cepl
Matej Cepl added the comment: Well, I hoped to get first some comments on the code itself (and especially the test). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-08-11 Thread Christian Heimes
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22181 ___ ___

[issue21514] update json module docs in light of RFC 7159 ECMA-404

2014-08-11 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: needs patch - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21514 ___

[issue19055] Clarify docs for re module: why * does not match as many repetitions as possible.

2014-08-11 Thread Akira Li
Akira Li added the comment: tl;dr: added patch that clarifies Python re behavior. Please, review. --- The documented behavior is not clear: why (a|ab)* is not equivalent to (a|ab)(a|ab) for aba if the docs say as many repetitions as are possible? And it is not obvious (it is not the only

[issue19055] Clarify docs for re module: why * does not match as many repetitions as possible.

2014-08-11 Thread Akira Li
Changes by Akira Li 4kir4...@gmail.com: Removed file: http://bugs.python.org/file36340/re-docs-repetitions.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19055 ___

[issue19055] Clarify docs for re module: why * does not match as many repetitions as possible.

2014-08-11 Thread Akira Li
Changes by Akira Li 4kir4...@gmail.com: Added file: http://bugs.python.org/file36341/re-docs-repetitions.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19055 ___

[issue5411] Add xz support to shutil

2014-08-11 Thread Akira Li
Akira Li added the comment: sphinx generates warning for the current docs introduced by this issue: WARNING: Explicit markup ends without a blank line; unexpected unindent. I've uploaded a documentation patch that fixes it. -- nosy: +akira Added file:

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-08-11 Thread Matej Cepl
Matej Cepl added the comment: This is a patch with tests working for the tip of cpython. -- hgrepos: +267 Added file: http://bugs.python.org/file36343/fix-issue19494-py35.patch ___ Python tracker rep...@bugs.python.org

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-08-11 Thread Matej Cepl
Changes by Matej Cepl mc...@redhat.com: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-08-11 Thread Matej Cepl
Changes by Matej Cepl mc...@redhat.com: Added file: http://bugs.python.org/file36344/fix-issue19494-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-08-11 Thread Matej Cepl
Matej Cepl added the comment: Mercurial seems to be incredibly slow to clone, for anybody who is willing to deal with git, my real repo is http://luther.ceplovi.cz/git/cpython.git/ (branches basicAuth19494 and basicAuth19494_py3k). -- ___ Python

[issue22182] distutils.file_util.move_file unpacks wrongly an exception

2014-08-11 Thread Claudiu Popa
New submission from Claudiu Popa: Hi. When os.rename fails inside distutils.file_util.move_file, the exception is unpacked using ``(num, msg) = e``. While this was valid in Python 2, in Python 3 it should be ``e.args``. The attached patched fixes this. -- components: Distutils files:

[issue22182] distutils.file_util.move_file unpacks wrongly an exception

2014-08-11 Thread Claudiu Popa
Claudiu Popa added the comment: Mm, it seems there's another instance of unpacking later on, when os.unlink fails. Here's the updated patch. -- Added file: http://bugs.python.org/file36346/issue22182.patch ___ Python tracker rep...@bugs.python.org

[issue22118] urljoin fails with messy relative URLs

2014-08-11 Thread Demian Brecht
Demian Brecht added the comment: Uploaded new patch. Removed support for RFC1808-specific behaviour. Extracted non-compliant tests into comment blocks indicating the behaviour is no longer supported. -- Added file: http://bugs.python.org/file36347/issue22118_2.patch

[issue22118] urljoin fails with messy relative URLs

2014-08-11 Thread Mike Lissner
Mike Lissner added the comment: Just hopping in here to say that the work going down here is beautiful. I've filed a lot of bugs. This one's not particularly difficult, but damn, I appreciate the speed and quality going into fixing it. Glad to see the Python language is a happy place with

[issue22183] datetime.timezone methods require datetime object

2014-08-11 Thread Patrick Westerhoff
New submission from Patrick Westerhoff: I’ve noticed that the methods in `datetime.timezone` all require a datetime object (or explicitely `None`) as its parameter or they will raise an exception. The datetime object however is never required for the implementation of the method, so it seems

[issue22183] datetime.timezone methods require datetime object

2014-08-11 Thread R. David Murray
R. David Murray added the comment: A timezone is a particular implementation of the general tzinfo API, and in the general case the datetime argument *is* required. This is already documented (ie: that timezone is a concrete implementation of tzinfo, and that the tzinfo API requires the

[issue22118] urljoin fails with messy relative URLs

2014-08-11 Thread Demian Brecht
Demian Brecht added the comment: Thanks Mike, it's always nice to get positive feedback :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22118 ___

[issue22183] datetime.timezone methods require datetime object

2014-08-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: As David explained, utcoffset() method signature is dictated by the base class. This is not a bug. -- resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-08-11 Thread R. David Murray
R. David Murray added the comment: This patch looks like a feature addition rather than the discussed optimization of always sending auth on the first request. As such it could only go into 3.5. I'm also adding Nick Coghlan to nosy, for his opinion on whether or not this

[issue5411] Add xz support to shutil

2014-08-11 Thread Berker Peksag
Berker Peksag added the comment: Fixed. Thanks for the patch, Akira. http://hg.python.org/cpython/rev/7fcfb634ccca -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5411

[issue22083] Refactor PyShell's breakpoint related methods

2014-08-11 Thread Saimadhav Heblikar
Saimadhav Heblikar added the comment: This patch does two things 1. Refactor pyshell-breakpoint-refactor.diff to reflect changes in pyshell-breakpoint-refactor.diff As in pyshell-breakpoint-refactor.diff, the set/clear(_here) breakpoint methods are refactored into logical methods. 2. If the

[issue14105] Breakpoints in debug lost if line is inserted; IDLE

2014-08-11 Thread Saimadhav Heblikar
Saimadhav Heblikar added the comment: While working on issue22083, I noticed a few redundant comments. This patch removes them. -- keywords: +patch Added file: http://bugs.python.org/file36349/remove-pyshell-comment.diff ___ Python tracker

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-08-11 Thread Matej Cepl
Matej Cepl added the comment: This patch looks like a feature addition rather than the discussed optimization of always sending auth on the first request. As such it could only go into 3.5. ??? I was trying hard not to break current API, so I have created a new handler to be on the safe

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-08-11 Thread R. David Murray
R. David Murray added the comment: But that introduces a new element of the API, which is an API change. I thought the plan was to change the existing code to always send the auth when it was available. Why would that change the API? (Maybe it does...I haven't looked into this issue in any

  1   2   >