Announce : LDTP 3.5.0 - Linux GUI test automation tool

2013-05-13 Thread Nagappan Alagappan
Hello, New API: * inserttext, objtimeout, guitimeout, getcellsize, getcellvalue, getobjectnameatcoords, getcombovalue, getaccesskey in Python client * doubleClick, doubleClickRow, onWindowCreate, getCellSize, getComboValue, appUnderTest, getAccessKey in Java client * getcellsize, getcellvalue in

Karlsruhe (Germany) Python User Group, May 17th 2013, 7pm

2013-05-13 Thread Jürgen A . Erhard
The Karlsruhe Python User Group (KaPy) meets again. Friday, 2013-05-17 (May 17th) at 19:00 (7pm) in the rooms of Entropia eV (the local affiliate of the CCC). See http://entropia.de/wiki/Anfahrt on how to get there. For your calendars: meetings are held monthly, on the 3rd Friday. There's also

Template Data Interface (tdi) 0.9.9.7

2013-05-13 Thread André Malo
Hello World! I'm pleased to announce version 0.9.9.7 of TDI. About TDI = TDI is a markup templating system written in python with (optional but recommended) speedup code written in C. It features strict markup / logic separation, is very fast and provides powerful tools for template

Pint 0.2 released. Python units library

2013-05-13 Thread Hernan Grecco
Hi, We are happy to announce Pint 0.2. Pint is a Python package to define, operate and manipulate physical quantities: the product of a numerical value and a unit of measurement. This release brings a lot of new exciting features including extended NumPy support, temperature conversion,

Re: object.enable() anti-pattern

2013-05-13 Thread Fábio Santos
On 13 May 2013 00:22, Greg Ewing greg.ew...@canterbury.ac.nz wrote: Wayne Werner wrote: On Fri, 10 May 2013, Gregory Ewing wrote: f = open(myfile.dat) f.close() data = f.read() To clarify - you don't want a class that has functions that need to be called in a certain order with

Re: Python for philosophers

2013-05-13 Thread Gregory Ewing
Citizen Kant wrote: What I do here is to try to understand. That's different from just knowing. Knowledge growth must be consequence of understanding's increasing. As the scope of my understanding increases, the more I look for increasing my knowledge. Never vice versa, because, knowing isn't

Re: Python for philosophers

2013-05-13 Thread Steven D'Aprano
On Sat, 11 May 2013 22:03:15 +0200, Citizen Kant wrote: Hi, this could be seen as an extravagant subject but that is not my original purpose. I still don't know if I want to become a programmer or not. At this moment I'm just inspecting the environment. Towards what purpose? Do you want to

Re: Python for philosophers

2013-05-13 Thread Steven D'Aprano
On Mon, 13 May 2013 12:34:13 +1200, Gregory Ewing wrote: In the most general terms, the Python interpeter (or any other computer system, for that matter) can be thought of as something with an internal state, and a transition function that takes the state together with some input and produces

Re: Python for philosophers

2013-05-13 Thread Steven D'Aprano
On Sun, 12 May 2013 16:17:02 +0200, Citizen Kant wrote: Thank you very much for your answers. I'm afraid that, at this stage, I must prevent myself from knowing too much about the subject. My idea here is trying to fill the gaps, mostly, using intuition. Then you are doomed to failure.

Re: Message passing syntax for objects | OOPv2

2013-05-13 Thread Mark Janssen
On Sun, May 12, 2013 at 10:18 AM, Ned Batchelder n...@nedbatchelder.com wrote: I've never understood why people use that site: the pages end up being unintelligible cocktail-party noise-scapes with no hope of understanding who is saying what, or in response to whom. You're very right. But

Re: Message passing syntax for objects | OOPv2

2013-05-13 Thread Fábio Santos
On 12 May 2013 18:23, Ned Batchelder n...@nedbatchelder.com wrote: I've never understood why people use that site: the pages end up being unintelligible cocktail-party noise-scapes with no hope of understanding who is saying what, or in response to whom. --Ned. There's not so much noise

Re: Python for philosophers

2013-05-13 Thread Steven D'Aprano
Some further details on something mentioned about Python being economical. On Sun, 12 May 2013 16:17:02 +0200, Citizen Kant wrote: For example: I'm plainly aware that the word python looks shorten than 0111 0001 01110100 01101000 0110 01101110. But it's shorten just for me and

Re: object.enable() anti-pattern

2013-05-13 Thread Chris Angelico
On Mon, May 13, 2013 at 4:32 PM, Fábio Santos fabiosantos...@gmail.com wrote: On 13 May 2013 00:22, Greg Ewing greg.ew...@canterbury.ac.nz wrote: The same argument can be applied to: foo = Foo() foo.do_something() foo.enable() # should have done this first You're passing an

Re: in need of some help...

2013-05-13 Thread Gregory Ewing
Dennis Lee Bieber wrote: Is that the accepted group noun? I'd think a crisis of Chrises is more alliterative... A confusion of Chrises might be more appropriate in this case. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: object.enable() anti-pattern

2013-05-13 Thread Fábio Santos
On 13 May 2013 08:40, Chris Angelico ros...@gmail.com wrote: On Mon, May 13, 2013 at 4:32 PM, Fábio Santos fabiosantos...@gmail.com wrote: On 13 May 2013 00:22, Greg Ewing greg.ew...@canterbury.ac.nz wrote: The same argument can be applied to: foo = Foo() foo.do_something()

How to make shutil.make_archive support symbol links?

2013-05-13 Thread zcbenz
Hi comp.lang.python group, I'm trying to make a zip archive with shutil.make_archive, but it seems that it doesn't support symbol links, after creating a archive with shutil.make_archive, all the symbol links would be lost. What I want is something like `zip -y`, which stores symbolic links as

Re: Message passing syntax for objects | OOPv2

2013-05-13 Thread Fábio Santos
Sounds a lot like reddit threads. On 13 May 2013 08:17, Mark Janssen dreamingforw...@gmail.com wrote: On Sun, May 12, 2013 at 10:18 AM, Ned Batchelder n...@nedbatchelder.com wrote: I've never understood why people use that site: the pages end up being unintelligible cocktail-party

Re: Python for philosophers

2013-05-13 Thread alex23
On May 13, 5:13 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: I'm not trying to beat the original Poster up for making an error, but demonstrating just how badly off track you can get by trying to reason from first principles (as Plato may have done) instead of empirical

Python's sad, unimaginative Enum

2013-05-13 Thread Mark Lawrence
That's the title of this little beast http://www.acooke.org/cute/Pythonssad0.html if anybody's interested. -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence -- http://mail.python.org/mailman/listinfo/python-list

[Off topic] Software epigrams

2013-05-13 Thread Steven D'Aprano
My, it's been a long time since I've seen these: http://pu.inf.uni-tuebingen.de/users/klaeren/epigrams.html They pre-date the Zen of Python by at least a decade, and quite frankly I think many of them miss the mark. But whether you agree or disagree with them, they're worth reading. --

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

2013-05-13 Thread Alister
On Mon, 13 May 2013 05:23:16 +0600, Mr. Joe wrote: I seem to stumble upon a situation where != operator misbehaves in python2.x. Not sure if it's my misunderstanding or a bug in python implementation. Here's a demo code to reproduce the behavior - # -*- coding: utf-8 -*- from __future__

Re: Python's sad, unimaginative Enum

2013-05-13 Thread Steven D'Aprano
On Mon, 13 May 2013 10:24:40 +0100, Mark Lawrence wrote: That's the title of this little beast http://www.acooke.org/cute/Pythonssad0.html if anybody's interested. Well, that's one way of looking at it. And I can't exactly *disagree*. But... but... In many ways, it's a dull language,

Re: Python's sad, unimaginative Enum

2013-05-13 Thread Jean-Michel Pichavant
- Original Message - That's the title of this little beast http://www.acooke.org/cute/Pythonssad0.html if anybody's interested. -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence --

Re: object.enable() anti-pattern

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

Re: Python for philosophers

2013-05-13 Thread Neil Cerutti
On 2013-05-13, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'm not trying to beat the original Poster up for making an error, but demonstrating just how badly off track you can get by trying to reason from first principles (as Plato may have done) instead of empirical study (as

Re: global variable not working inside function. Increment

2013-05-13 Thread feather . duster . kung . fu
On Friday, September 4, 2009 4:43:27 PM UTC-7, Helvin wrote: Hi, This increment thing is driving me nearly to the nuts-stage. I have a function that allows me to pick points. I want to count the number of times I have picked points. global no_picked no_picked = 0 def

Re: global variable not working inside function. Increment

2013-05-13 Thread charles benoit
On Friday, September 4, 2009 4:52:11 PM UTC-7, Rami Chowdhury wrote: global no_picked no_picked = 0 def picked(object, event): no_picked += 1 print no_picked In order to be able to affect variables in the global scope, you need to declare them

Re: global variable not working inside function. Increment

2013-05-13 Thread feather.duster.kung.fu
On Monday, May 13, 2013 7:10:50 AM UTC-7, charles benoit wrote: On Friday, September 4, 2009 4:52:11 PM UTC-7, Rami Chowdhury wrote: global no_picked no_picked = 0 def picked(object, event): no_picked += 1 print no_picked In

Re: Python for philosophers

2013-05-13 Thread Grant Edwards
On 2013-05-13, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Your premise that Python tries to be economical is incorrect. If anything, Python is the opposite: it is often profligate with resources (memory mostly) in order to save the human programmer time and effort. IOW,

Re: Python for philosophers

2013-05-13 Thread rusi
On May 13, 7:41 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: Python is not well-modelled as a Finite State Machine. Python is equivalent in computing power to a Turing Machine, while Finite State Machines are much weaker, so there are things that Python can do that a FSM

Re: [Off topic] Software epigrams

2013-05-13 Thread mar...@python.net
On Mon, May 13, 2013, at 05:20 AM, Steven D'Aprano wrote: My, it's been a long time since I've seen these: http://pu.inf.uni-tuebingen.de/users/klaeren/epigrams.html They pre-date the Zen of Python by at least a decade, and quite frankly I think many of them miss the mark. But whether

Re: global variable not working inside function. Increment

2013-05-13 Thread Jean-Michel Pichavant
Thank You for setting that straight. I'm just learning Python and NONE of the tutorials I read said anything about that . In fact they all say a global can be called from inside a Function. If possible please contact the ppl that write these things.I've heard of Ocam's razor but not

Getting ASCII encoding where unicode wanted under Py3k

2013-05-13 Thread Jonathan Hayward
I have a Py3k script, pasted below. When I run it I get an error about ASCII codecs that can't handle byte values that are too high. The error that I am getting is: UnicodeEncodeError: 'ascii' codec can't encode character '\u0161' in position 1442: ordinal not in range(128) args =

Re: global variable not working inside function. Increment

2013-05-13 Thread Andreas Perstinger
feather.duster.kung.fu feather.duster.kung...@gmail.com wrote: I'm just learning Python and NONE of the tutorials I read said anything about that . In fact they all say a global can be called from inside a Function. If possible please contact the ppl that write these things. Well, we don't know

Re: Python for philosophers

2013-05-13 Thread Chris Angelico
On Tue, May 14, 2013 at 12:53 AM, rusi rustompm...@gmail.com wrote: int fact(int n, int acc) { return !n? acc : fact(n-1,acc*n); } - When I run these, the C happily keeps giving answers until a million However examined closely we find that though the C is

Re: Getting ASCII encoding where unicode wanted under Py3k

2013-05-13 Thread Peter Pearson
On Mon, 13 May 2013 10:59:33 -0500, Jonathan Hayward wrote: --e89a8f3b9db145cbab04dc9b9a23 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable [snipped many lines of quoted-printable muck] My code is below. What should I be doing differently to be, in

Re: Getting ASCII encoding where unicode wanted under Py3k

2013-05-13 Thread MRAB
On 13/05/2013 16:59, Jonathan Hayward wrote: I have a Py3k script, pasted below. When I run it I get an error about ASCII codecs that can't handle byte values that are too high. The error that I am getting is: |UnicodeEncodeError: 'ascii' codec can't encode character'\u0161' in position

Re: [Chicago] Getting ASCII encoding where unicode wanted under Py3k

2013-05-13 Thread Carl Karsten
On Mon, May 13, 2013 at 10:59 AM, Jonathan Hayward jonathan.hayw...@pobox.com wrote: That is way too much code for me to try and dig into. Remove everything not needed to demo it. Replace big strings with little strings. My guess is it should be 1-3 lines, like print('123%(a)s' % {'a':

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

2013-05-13 Thread Fábio Santos
On 13 May 2013 11:04, Alister alister.w...@ntlworld.com wrote: this looks to me like an issue with operator precidence you code is evaluating as (Not x) == y rather than not (x == y) I can say for sure that the precedence is as expected. I always use not ... == ... Instead of !=. --

Re: Python's sad, unimaginative Enum

2013-05-13 Thread Chris Angelico
On Mon, May 13, 2013 at 8:17 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Let's look at his major criticisms: 1) values aren't automatically generated. True. So what? That is the *least* important part of enums. I stopped following the -ideas threads about enums, but IIRC

Re: [Off topic] Software epigrams

2013-05-13 Thread Chris Angelico
On Mon, May 13, 2013 at 7:20 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: My, it's been a long time since I've seen these: http://pu.inf.uni-tuebingen.de/users/klaeren/epigrams.html They pre-date the Zen of Python by at least a decade, and quite frankly I think many of

Re: [Off topic] Software epigrams

2013-05-13 Thread Skip Montanaro
8. A programming language is low level when its programs require attention to the irrelevant. So much a matter of debate. Indentation is irrelevant, why should Python programs pay attention to it? Block delimiters are irrelevant too, the interpreter should be able to figure them out from the

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

2013-05-13 Thread Ned Batchelder
On 5/13/2013 1:26 PM, Fábio Santos wrote: On 13 May 2013 11:04, Alister alister.w...@ntlworld.com mailto:alister.w...@ntlworld.com wrote: this looks to me like an issue with operator precidence you code is evaluating as (Not x) == y rather than not (x == y) I can say for sure that the

Re: [Off topic] Software epigrams

2013-05-13 Thread Chris Angelico
On Tue, May 14, 2013 at 4:02 AM, Skip Montanaro s...@pobox.com wrote: 8. A programming language is low level when its programs require attention to the irrelevant. So much a matter of debate. Indentation is irrelevant, why should Python programs pay attention to it? Block delimiters are

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

2013-05-13 Thread Chris Angelico
On Tue, May 14, 2013 at 4:08 AM, Ned Batchelder n...@nedbatchelder.com wrote: On 5/13/2013 1:26 PM, Fábio Santos wrote: On 13 May 2013 11:04, Alister alister.w...@ntlworld.com wrote: this looks to me like an issue with operator precidence you code is evaluating as (Not x) == y rather than

Re: Python for philosophers

2013-05-13 Thread rusi
On May 13, 9:24 pm, Chris Angelico ros...@gmail.com wrote: Your final conclusion is of course correct; nothing we build can be truly infinite. But we can certainly give some very good approximations, if we're prepared to pay for them. The reality is, though, that we usually do not want to pay

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

2013-05-13 Thread Fábio Santos
I think it is more readable. When doing more complicated statements I use != instead, but when it's a single test I prefer not … == It's a personal thing. It may also have to do with the fact that I didn't know python had != when I was a novice. On 13 May 2013 19:08, Ned Batchelder

Re: [Off topic] Software epigrams

2013-05-13 Thread Neil Cerutti
On 2013-05-13, Skip Montanaro s...@pobox.com wrote: 8. A programming language is low level when its programs require attention to the irrelevant. So much a matter of debate. Indentation is irrelevant, why should Python programs pay attention to it? Block delimiters are irrelevant too, the

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

2013-05-13 Thread Denis McMahon
On Sun, 12 May 2013 20:33:44 +0100, Alex Norton wrote: 'Traceback (most recent call last): File C:\Users\Me\Desktop\testy.py, line 174, in bWater.clicked.connect( water_clicked ) AttributeError: 'int' object has no attribute 'clicked'' appears when i run the module. It looks to me as if

Re: [Off topic] Software epigrams

2013-05-13 Thread Fábio Santos
On 13 May 2013 19:48, Neil Cerutti ne...@norwich.edu wrote: On 2013-05-13, Skip Montanaro s...@pobox.com wrote: 8. A programming language is low level when its programs require attention to the irrelevant. So much a matter of debate. Indentation is irrelevant, why should Python

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

2013-05-13 Thread Alister
On Mon, 13 May 2013 19:28:29 +0100, Fábio Santos wrote: I think it is more readable. When doing more complicated statements I use != instead, but when it's a single test I prefer not … == It's a personal thing. It may also have to do with the fact that I didn't know python had != when I was

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

2013-05-13 Thread Fábio Santos
On Mon, May 13, 2013 at 10:17 PM, Alister alister.w...@ntlworld.com wrote: On Mon, 13 May 2013 19:28:29 +0100, Fábio Santos wrote: I think it is more readable. When doing more complicated statements I use != instead, but when it's a single test I prefer not … == It's a personal thing. It may

Writing a blog post on the new Enum.

2013-05-13 Thread Fábio Santos
I have followed the process of the new PEP closely, and as such I know that there is a repository containing the reference implementation, a link to which was posted on the python-dev list. Is it okay to link to this repository in my new blog post about the Enum, so my readers can try it out? I

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

2013-05-13 Thread Mark Lawrence
On 13/05/2013 22:17, Alister wrote: On Mon, 13 May 2013 19:28:29 +0100, Fábio Santos wrote: I think it is more readable. When doing more complicated statements I use != instead, but when it's a single test I prefer not … == It's a personal thing. It may also have to do with the fact that I

Re: Writing a blog post on the new Enum.

2013-05-13 Thread Mark Lawrence
On 13/05/2013 22:44, Fábio Santos wrote: I have followed the process of the new PEP closely, and as such I know that there is a repository containing the reference implementation, a link to which was posted on the python-dev list. Is it okay to link to this repository in my new blog post about

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

2013-05-13 Thread Dave Angel
On 05/13/2013 06:53 PM, Mark Lawrence wrote: On 13/05/2013 22:17, Alister wrote: On Mon, 13 May 2013 19:28:29 +0100, Fábio Santos wrote: I think it is more readable. When doing more complicated statements I use != instead, but when it's a single test I prefer not … == It's a personal thing.

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

2013-05-13 Thread Andrew Berg
On 2013.05.13 17:53, Mark Lawrence wrote: I much prefer the alternative for != but some silly people insisted that this be removed from Python3. It's not removed from Python 3, though: Python 3.3.1 (v3.3.1:d9893d13c628, Apr 6 2013, 20:30:21) [MSC v.1600 64 bit (AMD64)] on win32 Type help,

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

2013-05-13 Thread Cameron Simpson
On 13May2013 19:22, Dave Angel da...@davea.name wrote: | On 05/13/2013 06:53 PM, Mark Lawrence wrote: | I much prefer the alternative for != but some silly people insisted | that this be removed from Python3. Just how stupid can you get? | | So which special methods should the operator call?

Re: Python for philosophers

2013-05-13 Thread Citizen Kant
I'm amazed with your feedback, even when due to a lack of knowledge I'm not able to discuss some of them. I've been inspecting the stuff about rewriting and that drew my attention to my first intuition of Python being economic. Maybe could it support my impression about a thing thats behind the

Re: Writing a blog post on the new Enum.

2013-05-13 Thread Fábio Santos
On Tue, May 14, 2013 at 12:09 AM, Ethan Furman et...@stoneleaf.us wrote: I just checked my settings there, and it looks like you're okay since the folks reading your blog would just be downloading, not logging and directly manipulating the repository. -- ~Ethan~ Okay, so I'm good. I'll go

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

2013-05-13 Thread Ian Kelly
On Mon, May 13, 2013 at 5:27 PM, Andrew Berg bahamutzero8...@gmail.com wrote: On 2013.05.13 17:53, Mark Lawrence wrote: I much prefer the alternative for != but some silly people insisted that this be removed from Python3. It's not removed from Python 3, though: Python 3.3.1

Re: Writing a blog post on the new Enum.

2013-05-13 Thread Ethan Furman
On 05/13/2013 02:44 PM, Fábio Santos wrote: I have followed the process of the new PEP closely, and as such I know that there is a repository containing the reference implementation, a link to which was posted on the python-dev list. Is it okay to link to this repository in my new blog post

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

2013-05-13 Thread Dave Angel
On 05/13/2013 07:30 PM, Cameron Simpson wrote: On 13May2013 19:22, Dave Angel da...@davea.name wrote: | On 05/13/2013 06:53 PM, Mark Lawrence wrote: | I much prefer the alternative for != but some silly people insisted | that this be removed from Python3. Just how stupid can you get? | | So

Re: Python for philosophers

2013-05-13 Thread Dave Angel
On 05/13/2013 07:32 PM, Citizen Kant wrote: SNIP Am I getting closer to the point? Depends on whom you think you're talking to. Clearly, you've replied to yourself, and top-posted besides. That's not a conversation, it's a monologue. -- DaveA --

Re: Python's sad, unimaginative Enum

2013-05-13 Thread Steven D'Aprano
On Mon, 13 May 2013 13:00:36 +0200, Jean-Michel Pichavant wrote: - Original Message - That's the title of this little beast http://www.acooke.org/cute/Pythonssad0.html if anybody's interested. -- If you're using GoogleCrap™ please read this

Re: [Off topic] Software epigrams

2013-05-13 Thread Dan Sommers
On Tue, 14 May 2013 04:12:53 +1000, Chris Angelico wrote: On Tue, May 14, 2013 at 4:02 AM, Skip Montanaro s...@pobox.com wrote: 8. A programming language is low level when its programs require attention to the irrelevant. I think irrelevant in this context means stuff like memory

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

2013-05-13 Thread Cameron Simpson
On 13May2013 21:41, Dave Angel da...@davea.name wrote: | On 05/13/2013 07:30 PM, Cameron Simpson wrote: | On 13May2013 19:22, Dave Angel da...@davea.name wrote: | | On 05/13/2013 06:53 PM, Mark Lawrence wrote: | | I much prefer the alternative for != but some silly people insisted | | that this

Re: [Off topic] Software epigrams

2013-05-13 Thread Chris Angelico
On Tue, May 14, 2013 at 1:08 PM, Dan Sommers d...@tombstonezero.net wrote: And if I've designed my program the right way, what's relevant in one place (package, module, function, line of code) is different from what's relevant in another. Absolutely. Layered systems FTW! Nothing matters but

Re: Python for philosophers

2013-05-13 Thread llanitedave
On Monday, May 13, 2013 4:32:43 PM UTC-7, Citizen Kant wrote: An entity named Python must be somehow as a serpent. Moe like a dead parrot, actually. -- http://mail.python.org/mailman/listinfo/python-list

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

2013-05-13 Thread Steven D'Aprano
On Mon, 13 May 2013 19:22:24 -0400, Dave Angel wrote: So which special methods should the operator call? By rights it ought to call both __gt__ and __lt__ and return True if either of them is True. The operator comes from Pascal, where it was used as not equal since ASCII doesn't include

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

2013-05-13 Thread Steven D'Aprano
On Mon, 13 May 2013 21:17:41 +, Alister wrote: I would then still write it as not (x == y) to make it clear to myself avoid any possible confusion although I think that X != Y is much cleaner. I think that is sad. If I read not (x == y) I would assume that the person writing the code

Re: Python for philosophers

2013-05-13 Thread Steven D'Aprano
On Tue, 14 May 2013 01:32:43 +0200, Citizen Kant wrote: An entity named Python must be somehow as a serpent. Don't forget that I'm with the freeing up of my memory, now I'm not trying to follow the path of what's told but acting like the monkey and pushing with my finger against the skin of

[issue10652] test___all_ + test_tcl fails (Windows installed binary)

2013-05-13 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10652 ___ ___ Python-bugs-list

[issue17962] Broken OpenSSL version in Windows builds

2013-05-13 Thread Georg Brandl
Georg Brandl added the comment: I could, but the checked-in 1.0.1d is different from the tarball in some respects, so it's better for Martin to do this. -- assignee: - loewis ___ Python tracker rep...@bugs.python.org

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

2013-05-13 Thread Georg Brandl
Georg Brandl added the comment: Sorry, this was not clear to me. 3.2 users will have to live with the bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17838 ___

[issue17966] Lack of consistency in PEP 8 -- Style Guide for Python Code

2013-05-13 Thread Georg Brandl
Georg Brandl added the comment: Interesting observation :) However, the alignment in the PEP is in prose, not code. -- assignee: docs@python - nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17966

[issue14191] argparse doesn't allow optionals within positionals

2013-05-13 Thread paul j3
Changes by paul j3 ajipa...@gmail.com: Removed file: http://bugs.python.org/file29880/mixed.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14191 ___

[issue17965] argparse does not dest.replace('-', '_') for positionals

2013-05-13 Thread paul j3
Changes by paul j3 ajipa...@gmail.com: -- title: argparse does not dest.replace('-', '_') for postionals - argparse does not dest.replace('-', '_') for positionals ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17965

[issue17914] add os.cpu_count()

2013-05-13 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: @Stinner: 1. While I agree with your idea of what you have done in test_os, (particularly, for determining if platform is supported or not) there seems to be no reason(AFAIK) to have a shutil for cpu_count. I agree with neologox there. 2. Also I am not

[issue17966] Lack of consistency in PEP 8 -- Style Guide for Python Code

2013-05-13 Thread Paul Jurczak
Paul Jurczak added the comment: Correct, it is in mixed prose and code. However, the underlying principle in this PEP is: guidelines provided here are intended to improve the readability of code. The author used vertical alignment (for mixed prose and code), because of its superior

[issue17962] Broken OpenSSL version in Windows builds

2013-05-13 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: I would like to take a crack at it. Would it be possible(I mean permission wise)? How can I proceed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17962

[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-13 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file30243/nt_module.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17941

[issue9856] Change object.__format__(s) where s is non-empty to a TypeError

2013-05-13 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: +1 to Terry for If its class does not override .__format__, then it seems that it should act the same as a direct object instance -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9856

[issue17962] Broken OpenSSL version in Windows builds

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't know how much work there is. Perhaps you want to produce a diff between the current external 1.0.1d and the upstream version. Otherwise just let Georg or Martin handle it ;) -- ___ Python tracker

[issue17934] Add a frame method to clear expensive details

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is an alternative patch raising RuntimeError on executing frames. Please tell which one you prefer :) -- Added file: http://bugs.python.org/file30244/frame_clear_alt.patch ___ Python tracker

[issue17487] wave.Wave_read.getparams should be more user friendly

2013-05-13 Thread Claudiu.Popa
Claudiu.Popa added the comment: There is a regression with the latest patch, `getparams` output is no longer picklable. The attached patch fixes this issue. Also, I renamed the internal namedtuple to something more meaningful. -- Added file:

[issue17487] wave.Wave_read.getparams should be more user friendly

2013-05-13 Thread Claudiu.Popa
Changes by Claudiu.Popa pcmantic...@gmail.com: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17487 ___ ___

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think the logic is slightly wrong in remove_subclass. When you encounter Py_None, you can't be sure it's the weakref for the current type; theoretically, it could be any other one (depending on oddities in cleanup order, cycle collection, etc.). So you have

[issue17914] add os.cpu_count()

2013-05-13 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: Modified patch based on further comments and review. 1. Removed *everything* from os.py 2. removed typecasting for ncpu where not required. 3. removed redundant comments -- Added file: http://bugs.python.org/file30246/issue17914-5.patch

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Attaching an alternative implementation for remove_subclass(). -- Added file: http://bugs.python.org/file30247/subtype2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17936

[issue17968] memory leak in listxattr()

2013-05-13 Thread Antoine Pitrou
New submission from Antoine Pitrou: os.listxattr() leaks its internal buffer when the first call to C listxattr() fails with ERANGE. This wasn't caught by the refleak bot, probably because xattrs are not enabled on it. -- files: listxattr_leak.patch keywords: patch messages: 189114

[issue17966] Lack of consistency in PEP 8 -- Style Guide for Python Code

2013-05-13 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17966 ___ ___ Python-bugs-list

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

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with Nick here, there's no reason to auto-number constants in Python. This is not C :-) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17961

[issue17956] add ScheduledExecutor

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: To be honest I can't find much to say about this proposal, but I think it would be good if the time function were configurable (both for test purposes, and to allow passing e.g. time.monotonic). I suppose this could be an executor option. --

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Basically the logic is this: When the class goes away, it _always_ calls remove_subclass(). Now, this may be before or after the weakref has been clear so that it will either find itself in a weakref, or a clear weakref. In case this logic is

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: In case this logic is flawed, we know that when remove_subclass() is called, exactly one child is removed. Whether it is us, or some previous class, is irrelevant. remove_subclass() is called when __bases__ is assigned to, so it is not irrelevant: class

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: There are two cases when remove_subclass is called: One when we are changing base classes(the original use of this function), and in this case we must find the correct one. The second one is when the class is being deleted, for housekeeping of the

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: The second one is when the class is being deleted, for housekeeping of the weakrefs. I worry that your alternative will cause us to walk the entire list in the second case because it will be called when the weakref has been cleared, so it will never find

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Actually, in a program that dynamically creates a class, and then deletes it, you would expect a O(1) complexity. adding children at the end, and searching from the end, is a way to achieve this. While I admit that I oversaw the exact requirement for

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: While I admit that I oversaw the exact requirement for __bases__, I think that allowing for a None to be sufficient when the class is being deleted is an important improvement. You can't be sure the None corresponds to the type being deleted and not

  1   2   >