dill-0.2b1

2013-12-03 Thread Michael McKerns
dill: serialize all of python (almost) # Version 0.2b1: 11/27/13 The latest released version is dill-0.2b1, available at: http://dev.danse.us/trac/pathos You can get the latest development release with all the shiny new features at: http://dev.danse.us/packages or even better, fork

Re: using ffmpeg command line with python's subprocess module

2013-12-03 Thread Alain Ketterlin
Ben Finney ben+pyt...@benfinney.id.au writes: Chris Angelico ros...@gmail.com writes: On Mon, Dec 2, 2013 at 10:34 PM, iMath redstone-c...@163.com wrote: ffmpeg -f concat -i (for f in ./*.wav; do echo file '$f'; done) -c copy output.wav ffmpeg -f concat -i (printf file '%s'\n ./*.wav)

Re: I look for a list to convert time zone abbreviation to full time zone in python

2013-12-03 Thread Stuart Bishop
On Mon, Dec 2, 2013 at 11:18 PM, Stéphane Klein cont...@stephane-klein.info wrote: * are there the same list somewhere (I didn't found in pytz) ? Not that I know of. * is it possible to append this list in pytz or in standard python date module ? It could go into pytz (but generated from

Re: [OT] Managing Google Groups headaches

2013-12-03 Thread Mark Lawrence
On 03/12/2013 01:17, Michael Torrie wrote: And the list goes on. The love of money... -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Code of Conduct, Trolls, and Thankless Jobs [was Re: Python Unicode handling wins again -- mostly]

2013-12-03 Thread Mark Lawrence
On 03/12/2013 04:32, Grant Edwards wrote: On 2013-12-03, Roy Smith r...@panix.com wrote: I believe that Pythonistas should commit themselves to achieving the goal, before this decade is out, of making Python 3 the default version and having everybody be cool with unicode. I'm cool with

extracting a heapq in a for loop - there must be more elegant solution

2013-12-03 Thread Helmut Jarausch
Hi, I'd like to extracted elements from a heapq in a for loop. I feel my solution below is much too complicated. How to do it more elegantly? I know I could use a while loop but I don't like it. Many thanks for some lessons in Python. Here is my clumsy solution from heapq import heappush,

Re: Code of Conduct, Trolls, and Thankless Jobs [was Re: Python Unicode handling wins again -- mostly]

2013-12-03 Thread Mark Lawrence
On 03/12/2013 01:38, Roy Smith wrote: In article mailman.3485.1386021891.18130.python-l...@python.org, Mark Lawrence breamore...@yahoo.co.uk wrote: My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. I believe that Pythonistas should

Re: extracting a heapq in a for loop - there must be more elegant solution

2013-12-03 Thread Peter Otten
Helmut Jarausch wrote: Hi, I'd like to extracted elements from a heapq in a for loop. I feel my solution below is much too complicated. How to do it more elegantly? I know I could use a while loop but I don't like it. Many thanks for some lessons in Python. Here is my clumsy solution

Re: extracting a heapq in a for loop - there must be more elegant solution

2013-12-03 Thread rusi
On Tuesday, December 3, 2013 5:48:59 PM UTC+5:30, Helmut Jarausch wrote: Hi, I'd like to extracted elements from a heapq in a for loop. I feel my solution below is much too complicated. How to do it more elegantly? I know I could use a while loop but I don't like it. How about def

Python for microcontrollers

2013-12-03 Thread Mark Lawrence
I thought this might be of interest Http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --

Re: extracting a heapq in a for loop - there must be more elegant solution

2013-12-03 Thread Duncan Booth
Helmut Jarausch jarau...@igpm.rwth-aachen.de wrote: Hi, I'd like to extracted elements from a heapq in a for loop. I feel my solution below is much too complicated. How to do it more elegantly? I know I could use a while loop but I don't like it. Many thanks for some lessons in Python.

Re: Python Unicode handling wins again -- mostly

2013-12-03 Thread Neil Cerutti
On 2013-12-02, Ethan Furman et...@stoneleaf.us wrote: On 11/29/2013 04:44 PM, Steven D'Aprano wrote: Out of the nine tests, Python 3.3 passes six, with three tests being failures or dubious. If you believe that the native string type should operate on code-points, then you'll think that

Re: extracting a heapq in a for loop - there must be more elegant solution

2013-12-03 Thread Jussi Piitulainen
Helmut Jarausch writes: ... I know I could use a while loop but I don't like it. ... from heapq import heappush, heappop # heappop raises IndexError if heap is empty ... # how to avoid / simplify the following function def in_sequence(H) : try : while True : N= heappop(H)

Re: using ffmpeg command line with python's subprocess module

2013-12-03 Thread iMath
在 2013年12月3日星期二UTC+8下午5时33分09秒,Alain Ketterlin写道: Ben Finney ben+pyt...@benfinney.id.au writes: Chris Angelico ros...@gmail.com writes: On Mon, Dec 2, 2013 at 10:34 PM, iMath redstone-c...@163.com wrote: ffmpeg -f concat -i (for f in ./*.wav; do echo file '$f'; done) -c

Re: Python for microcontrollers

2013-12-03 Thread Colin J. Williams
On 03/12/2013 7:58 AM, Mark Lawrence wrote: I thought this might be of interest Http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers Is this intended to be better than the Raspberry PI? RPi handles Python 2 or 3. How would it differ? Colin W. --

[OT]Does the BDFL play golf?

2013-12-03 Thread Mark Lawrence
Saw this on a UK Python mailing list and couldn't resist http://thesandtrap.com/products/snake-eyes-python-xld-iron-head -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --

Re: Python Unicode handling wins again -- mostly

2013-12-03 Thread Ethan Furman
On 12/02/2013 12:38 PM, Ethan Furman wrote: On 11/29/2013 04:44 PM, Steven D'Aprano wrote: Out of the nine tests, Python 3.3 passes six, with three tests being failures or dubious. If you believe that the native string type should operate on code-points, then you'll think that Python does the

Re: I look for a list to convert time zone abbreviation to full time zone in python

2013-12-03 Thread Stéphane Klein
Le 03/12/13 11:07, Stuart Bishop a écrit : It could go into pytz (but generated from the IANA database, not from the list you quote). Whether it should go into pytz is debatable. Ok. If you need to map an abbreviation back to a single timezone you are solving the wrong problem, because you

Re: I look for a list to convert time zone abbreviation to full time zone in python

2013-12-03 Thread Stéphane Klein
Le 03/12/13 16:27, Stéphane Klein a écrit : python-dateutil have a auto discover parse function, but I don't want to use this auto discover feature For now, I use this : import dateutil.parser import pytz tz_str = '''-12 Y -11 X NUT SST -10 W CKT HAST HST TAHT TKT -9 V AKST GAMT GIT

The input and output is as wanted, but why error?

2013-12-03 Thread geezle86
I am trying to solve this problem: http://codeforces.com/problemset/problem/71/A The input and output is as wanted, but my answer keep rejected, here is my source code http://txt.do/1smv Please, I need help. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python for microcontrollers

2013-12-03 Thread Travis Griggs
On Dec 3, 2013, at 6:18 AM, Colin J. Williams c...@ncf.ca wrote: On 03/12/2013 7:58 AM, Mark Lawrence wrote: I thought this might be of interest Http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers Is this intended to be better than the Raspberry PI?

Re: The input and output is as wanted, but why error?

2013-12-03 Thread John Gordon
In 387f5b5f-faf1-4715-8d49-e366be53f...@googlegroups.com geezl...@gmail.com writes: I am trying to solve this problem: http://codeforces.com/problemset/problem/71/A The input and output is as wanted, but my answer keep rejected, here is my source code http://txt.do/1smv Please, I need

Re: The input and output is as wanted, but why error?

2013-12-03 Thread Neil Cerutti
On 2013-12-03, geezl...@gmail.com geezl...@gmail.com wrote: I am trying to solve this problem: http://codeforces.com/problemset/problem/71/A Please post your code in and the problem in your message. Here it is for those reading along: A. Way Too Long Words Sometimes some words like

Re: Python for microcontrollers

2013-12-03 Thread Michael Torrie
On 12/03/2013 07:18 AM, Colin J. Williams wrote: On 03/12/2013 7:58 AM, Mark Lawrence wrote: I thought this might be of interest Http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers Is this intended to be better than the Raspberry PI? RPi handles Python 2

Re: The input and output is as wanted, but why error?

2013-12-03 Thread geezle86
x = input() if x.isdigit() == False: i = len(x) j = i - 1 k = i - 2 xList = list(x) if len(xList) 4: print(xList[0], int(k), xList[j], sep='', end='') else: print(x) else: SystemExit I just dont understand what is wrong,

Re: The input and output is as wanted, but why error?

2013-12-03 Thread geezle86
x = input() if x.isdigit() == False: i = len(x) j = i - 1 k = i - 2 xList = list(x) if len(xList) 4: print(xList[0], int(k), xList[j], sep='', end='') else: print(x) else: SystemExit I just dont understand what is wrong,

Re: The input and output is as wanted, but why error?

2013-12-03 Thread geezle86
Well, i've changed the if len(xList).. from 4 to 10 But still, it is not accepted :( -- https://mail.python.org/mailman/listinfo/python-list

Re: The input and output is as wanted, but why error?

2013-12-03 Thread Mark Lawrence
On 03/12/2013 16:38, geezl...@gmail.com wrote: Well, i've changed the if len(xList).. from 4 to 10 But still, it is not accepted :( Where is your code that meets these requirements? Input The first line contains an integer n (1?=?n?=?100). Each of the following n lines contains one word.

Re: The input and output is as wanted, but why error?

2013-12-03 Thread Neil Cerutti
On 2013-12-03, geezl...@gmail.com geezl...@gmail.com wrote: x = input() Your first problem is that input() returns text only up the a newline, and then stops. So you are reading the initial number line, but never reading the rest of the lines. -- Neil Cerutti --

Re: Python for microcontrollers

2013-12-03 Thread Michael Torrie
On 12/03/2013 09:04 AM, Travis Griggs wrote: Having forayed into the world of small small micro controllers myself this last year and a half, I’m kind of torn on whether this is a good idea or not. But I think it’s cool they’re trying. And I’d definitely try it to see how it worked out. I've

Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread Piotr Dobrogost
Hi! I find global getattr() function awkward when reading code. What is the reason there's no natural syntax allowing to access attributes with names not being valid Python identifiers in a similar way to other attributes? Something along the line of

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread Ned Batchelder
On 12/3/13 12:14 PM, Piotr Dobrogost wrote: Hi! I find global getattr() function awkward when reading code. What is the reason there's no natural syntax allowing to access attributes with names not being valid Python identifiers in a similar way to other attributes? Something along the line of

Re: The input and output is as wanted, but why error?

2013-12-03 Thread rusi
On Tuesday, December 3, 2013 9:18:43 PM UTC+5:30, geez...@gmail.com wrote: I am trying to solve this problem: http://codeforces.com/problemset/problem/71/A The input and output is as wanted, but my answer keep rejected, here is my source code http://txt.do/1smv Please, I need help. I

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread Dave Angel
On Tue, 3 Dec 2013 09:14:49 -0800 (PST), Piotr Dobrogost p...@google-groups-2013.dobrogost.net wrote: I find global getattr() function awkward when reading code. Me too. What is the reason there's no natural syntax allowing to access attributes with names not being valid Python identifiers

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread Ethan Furman
On 12/03/2013 09:14 AM, Piotr Dobrogost wrote: I find global getattr() function awkward when reading code. What is the reason there's no natural syntax allowing to access attributes with names not being valid Python identifiers in a similar way to other attributes? Something along the line

Re: The input and output is as wanted, but why error?

2013-12-03 Thread Dave Angel
On Tue, 3 Dec 2013 08:35:20 -0800 (PST), geezl...@gmail.com wrote: really, i dont know why.. :( How about because you do a system exit on the first line of their input? The one that's all digits. And even if you get past that, you only process one of their words. -- DaveA --

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread random832
On Tue, Dec 3, 2013, at 12:14, Piotr Dobrogost wrote: Hi! I find global getattr() function awkward when reading code. What is the reason there's no natural syntax allowing to access attributes with names not being valid Python identifiers in a similar way to other attributes? Something

Re: Python Unicode handling wins again -- mostly

2013-12-03 Thread wxjmfauth
Le mardi 3 décembre 2013 06:06:26 UTC+1, Steven D'Aprano a écrit : On Mon, 02 Dec 2013 16:14:13 -0500, Ned Batchelder wrote: On 12/2/13 3:38 PM, Ethan Furman wrote: On 11/29/2013 04:44 PM, Steven D'Aprano wrote: Out of the nine tests, Python 3.3 passes six, with three tests

Re: extracting a heapq in a for loop - there must be more elegant solution

2013-12-03 Thread Cameron Simpson
On 03Dec2013 12:18, Helmut Jarausch jarau...@igpm.rwth-aachen.de wrote: I'd like to extracted elements from a heapq in a for loop. I feel my solution below is much too complicated. How to do it more elegantly? I can't believe nobody has mentioned PriorityQueue. A PriorityQueue (from the

Re: how to implement a queue-like container with sort function

2013-12-03 Thread Cameron Simpson
On 02Dec2013 07:26, Ned Batchelder n...@nedbatchelder.com wrote: Actually, I had a long conversation in the #python IRC channel with the OP at the same time he was posting the question here, and it turns out he knows exactly how many entries are going into the queue, so a plain-old list is the

Re: how to implement a queue-like container with sort function

2013-12-03 Thread Cameron Simpson
On 04Dec2013 08:17, I wrote: On 02Dec2013 07:26, Ned Batchelder n...@nedbatchelder.com wrote: Actually, I had a long conversation in the #python IRC channel with the OP at the same time he was posting the question here, and it turns out he knows exactly how many entries are going into the

Re: how to implement a queue-like container with sort function

2013-12-03 Thread Ned Batchelder
On 12/3/13 4:19 PM, Cameron Simpson wrote: On 04Dec2013 08:17, I wrote: On 02Dec2013 07:26, Ned Batchelder n...@nedbatchelder.com wrote: Actually, I had a long conversation in the #python IRC channel with the OP at the same time he was posting the question here, and it turns out he knows

Re: extracting a heapq in a for loop - there must be more elegant solution

2013-12-03 Thread Ian Kelly
On Tue, Dec 3, 2013 at 2:13 PM, Cameron Simpson c...@zip.com.au wrote: On 03Dec2013 12:18, Helmut Jarausch jarau...@igpm.rwth-aachen.de wrote: I'd like to extracted elements from a heapq in a for loop. I feel my solution below is much too complicated. How to do it more elegantly? I can't

Python 2.7.5: Strange and differing behavior depending on sys.setdefaultencoding being set

2013-12-03 Thread Hans-Peter Jansen
Hi, I'm experiencing strange behavior with attached code, that differs depending on sys.setdefaultencoding being set or not. If it is set, the code works as expected, if not - what should be the usual case - the code fails with some non-sensible traceback. I tried to boil it down to a

Re: extracting a heapq in a for loop - there must be more elegant solution

2013-12-03 Thread Ned Batchelder
On 12/3/13 4:43 PM, Ian Kelly wrote: On Tue, Dec 3, 2013 at 2:13 PM, Cameron Simpson c...@zip.com.au wrote: On 03Dec2013 12:18, Helmut Jarausch jarau...@igpm.rwth-aachen.de wrote: I'd like to extracted elements from a heapq in a for loop. I feel my solution below is much too complicated. How

Re: Python 2.7.5: Strange and differing behavior depending on sys.setdefaultencoding being set

2013-12-03 Thread Chris Angelico
On Wed, Dec 4, 2013 at 9:32 AM, Hans-Peter Jansen h...@urpla.net wrote: I'm experiencing strange behavior with attached code, that differs depending on sys.setdefaultencoding being set or not. If it is set, the code works as expected, if not - what should be the usual case - the code fails with

Re: how to implement a queue-like container with sort function

2013-12-03 Thread Cameron Simpson
On 03Dec2013 16:34, Ned Batchelder n...@nedbatchelder.com wrote: On 12/3/13 4:19 PM, Cameron Simpson wrote: And then I check the source:-( He actually said I want to a fixed length list-like container. That still sounds like a limit to the number of entries. Sorry, I was unclear. When I

Re: extracting a heapq in a for loop - there must be more elegant solution

2013-12-03 Thread Cameron Simpson
On 03Dec2013 14:43, Ian Kelly ian.g.ke...@gmail.com wrote: On Tue, Dec 3, 2013 at 2:13 PM, Cameron Simpson c...@zip.com.au wrote: On 03Dec2013 12:18, Helmut Jarausch jarau...@igpm.rwth-aachen.de wrote: I'd like to extracted elements from a heapq in a for loop. I feel my solution below is

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread Piotr Dobrogost
On Tuesday, December 3, 2013 7:03:41 PM UTC+1, rand...@fastmail.us wrote: On Tue, Dec 3, 2013, at 12:14, Piotr Dobrogost wrote: Hi! I find global getattr() function awkward when reading code. What is the reason there's no natural syntax allowing to access attributes with names not

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread Piotr Dobrogost
On Tuesday, December 3, 2013 6:31:58 PM UTC+1, Ethan Furman wrote: When would you have attribute names that are not valid identifiers? See my answer to rand's post. -- https://mail.python.org/mailman/listinfo/python-list

Re: The input and output is as wanted, but why error?

2013-12-03 Thread Denis McMahon
On Tue, 03 Dec 2013 07:48:43 -0800, geezle86 wrote: I am trying to solve this problem: http://codeforces.com/problemset/problem/71/A That's not a problem, it's a url. The input and output is as wanted, but my answer keep rejected, here is my source code http://txt.do/1smv That's not

Re: Python 2.7.5: Strange and differing behavior depending on sys.setdefaultencoding being set

2013-12-03 Thread Hans-Peter Jansen
Hi Chris, On Mittwoch, 4. Dezember 2013 10:20:31 Chris Angelico wrote: On Wed, Dec 4, 2013 at 9:32 AM, Hans-Peter Jansen h...@urpla.net wrote: I'm experiencing strange behavior with attached code, that differs depending on sys.setdefaultencoding being set or not. If it is set, the code

Re: Python 2.7.5: Strange and differing behavior depending on sys.setdefaultencoding being set

2013-12-03 Thread Chris Angelico
On Wed, Dec 4, 2013 at 11:15 AM, Hans-Peter Jansen h...@urpla.net wrote: Given the amount of special unicode handling code, that is necessary to keep Python 2 happy, makes proceeding with it no real fun on a longer term.. And the biggest proponent for hacking in Python IS the fun part of it.

Re: [OT] Managing Google Groups headaches

2013-12-03 Thread alex23
On 3/12/2013 5:13 PM, Steven D'Aprano wrote: You poor fools you, this is what happens when you give control of the tools you use to a (near) monopolist whose incentives are not your incentives. To paraphrase Franklin: those who would give up control to purchase convenience deserve neither. A

Re: Managing Google Groups headaches

2013-12-03 Thread Cameron Simpson
On 28Nov2013 19:46, Arif Khokar akhokar1...@wvu.edu wrote: The problem with just using email is that it's a bit more difficult to browse archived posts to this group. After I subscribed to this group (comp.lang.python) using my news client, I could immediately browse posts made as far back as

Re: Managing Google Groups headaches

2013-12-03 Thread Cameron Simpson
On 30Nov2013 14:25, pec...@pascolo.net pec...@pascolo.net wrote: Dennis Lee Bieber wlfr...@ix.netcom.com writes: [NNTP] clients provide full-fledged editors and conversely full-fledged editors provide NNTP clients GNU Emacs is a LISP operating system disguised as a word processor.

Re: how to implement a queue-like container with sort function

2013-12-03 Thread iMath
在 2013年12月4日星期三UTC+8上午7时23分49秒,Cameron Simpson写道: On 03Dec2013 16:34, Ned Batchelder n...@nedbatchelder.com wrote: On 12/3/13 4:19 PM, Cameron Simpson wrote: And then I check the source:-( He actually said I want to a fixed length list-like container. That still sounds like a limit to

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread Tim Chase
On 2013-12-03 15:47, Piotr Dobrogost wrote: The getattr function is meant for when your attribute name is in a variable. Being able to use strings that aren't valid identifiers is a side effect. Why do you say it's a side effect? I think random832 is saying that the designed purpose

any use case of logging.config.listen()?

2013-12-03 Thread Zhang Weiwu
Why would anyone use it? I can't think of use cases when one need to change logging configuration dynamically through socket, but not needing the same flexibility on overall configuration for his application (configparser). It feels strange to design a socket interface only to expose logging

Re: Tkinter: winfo_screenmmwidth discussion

2013-12-03 Thread josefg
On Tuesday, November 26, 2013 2:13:57 PM UTC-8, jos...@gmail.com wrote: I am currently using Windows 7 Sp1, Tkinter 8.5, Python 2.7.4 on a laptop with no attached monitor. I am attempting to use winfo_screenmmwidth, but the returned value is incorrect. Specs state 280 mm. Physical measurement

Re: Managing Google Groups headaches

2013-12-03 Thread rusi
On Wednesday, December 4, 2013 6:10:05 AM UTC+5:30, Cameron Simpson wrote: Dennis Lee Bieber writes: [NNTP] clients provide full-fledged editors and conversely full-fledged editors provide NNTP clients GNU Emacs is a LISP operating system disguised as a word processor.

Re: using ffmpeg command line with python's subprocess module

2013-12-03 Thread iMath
在 2013年12月3日星期二UTC+8上午9时42分11秒,rusi写道: On Tuesday, December 3, 2013 6:45:42 AM UTC+5:30, iMath wrote: so is there any way to create a temporary file by Python here ? http://docs.python.org/2/library/tempfile.html I use the following code to do the test ,but error occurred ,it prompts

Re: using ffmpeg command line with python's subprocess module

2013-12-03 Thread iMath
在 2013年12月3日星期二UTC+8上午9时42分11秒,rusi写道: On Tuesday, December 3, 2013 6:45:42 AM UTC+5:30, iMath wrote: so is there any way to create a temporary file by Python here ? http://docs.python.org/2/library/tempfile.html I use the following code to do the test ,but error occurred ,it prompts

Re: Managing Google Groups headaches

2013-12-03 Thread Chris Angelico
On Wed, Dec 4, 2013 at 12:39 PM, rusi rustompm...@gmail.com wrote: The unfortunate and inexorable conclusion is that when the (wo)man - computer relation goes from 1-1 to 1-many, data and functionality will move away from 'own-machine' to the cloud. Will the data be subject to privacy-abuse

Re: any use case of logging.config.listen()?

2013-12-03 Thread Dan Sommers
On Wed, 04 Dec 2013 09:34:13 +0800, Zhang Weiwu wrote: Why would anyone use [logging.config.listen()]? I can't think of use cases when one need to change logging configuration dynamically through socket, but not needing the same flexibility on overall configuration for his application

Re: multiprocessing: child process share changes to global variable

2013-12-03 Thread Jason Friedman
#--- temp.py - #run at Python 2.7 command prompt import time import multiprocessing as mp lst = [] lstlst = [] def alist(x): lst.append(x) lstlst.append(lst) print a return lst if __name__=='__main__': pool = mp.Pool(3)

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread Tim Roberts
Piotr Dobrogost p...@google-groups-2013.dobrogost.net wrote: Attribute access syntax being very concise is very often preferred to dict's interface. It is not very concise. It is slightly more concise. x = obj.value1 x = dct['value1'] You have saved 3 keystrokes. That is not a

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread rusi
On Wednesday, December 4, 2013 11:15:05 AM UTC+5:30, Tim Roberts wrote: Piotr Dobrogost wrote: Attribute access syntax being very concise is very often preferred to dict's interface. It is not very concise. It is slightly more concise. x = obj.value1 x = dct['value1'] You

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread picomancer
New submission from picomancer: Try the following in your favorite Python version: import json json.loads(.5) On my Python (2.7.4 and 3.3.1 on Ubuntu Saucy Salamander), I get an exception. However, x = .5 is a valid Python number. With respect to the parsing of floats by the json

[issue19872] Remove unused imports in pathlib

2013-12-03 Thread Vajrasky Kok
New submission from Vajrasky Kok: Attached the patch to remove unused imports in pathlib. -- components: Library (Lib) files: remove_unused_import_in_pathlib.patch keywords: patch messages: 205081 nosy: pitrou, vajrasky priority: normal severity: normal status: open title: Remove unused

[issue19873] There is a duplicate function in Lib/test/test_pathlib.py

2013-12-03 Thread Vajrasky Kok
New submission from Vajrasky Kok: Here it is (Lib/test/test_pathlib.py, line 1240): def _check_resolve_relative(self, p, expected): q = p.resolve() self.assertEqual(q, expected) def _check_resolve_absolute(self, p, expected): q = p.resolve()

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think it would be better to adhere to the JSON spec, which doesn't allow numbers to start with a decimal point: http://json.org/ If we go this way, the documentation should at least be fixed; and, as you say, we could also add a unit test for it.

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19871 ___ ___ Python-bugs-list

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19871 ___ ___

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-03 Thread Anthony Baire
Anthony Baire added the comment: The patch is fine, but it is hard to rely on it to prevent bugs from happening because that requires cooperation from all modules registering signal handlers. Anyway it facilitates reusing code that was not written for an event-driven context (and many will do

[issue19872] Remove unused imports in pathlib

2013-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset a6245b10e8b6 by Antoine Pitrou in branch 'default': Issue #19872: remove unused imports in pathlib. Patch by Vajrasky Kok. http://hg.python.org/cpython/rev/a6245b10e8b6 -- nosy: +python-dev ___ Python

[issue19872] Remove unused imports in pathlib

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you :) -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19872 ___

[issue19800] Write more detailed framing tests

2013-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1c04427fff07 by Antoine Pitrou in branch 'default': Issue #19800: make the pickle framing tests more precise. http://hg.python.org/cpython/rev/1c04427fff07 -- nosy: +python-dev ___ Python tracker

[issue19800] Write more detailed framing tests

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed with offset replaced with pos. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19800

[issue19873] There is a duplicate function in Lib/test/test_pathlib.py

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, it's not really a duplicate function (the code is the same, but the intent is different). I'm not sure it's worth deduplicating. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19873

[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2013-12-03 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Strictly speaking b) is not a semantic change. Depending on your semantic definition of semantics. At any rate it is even less so than a) since the temporary list is hidden from view and the only side effect is additional memory usage. --

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agree with Antoine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19871 ___ ___ Python-bugs-list mailing

[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2013-12-03 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: d), We could also simply issue a (documentation) warning, that the iterator methods of these dictionares are known to be fragile, and recommend that people use the keys(), values() and items() instead. --

[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: d) sounds like a good enough resolution at this point. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7105 ___

[issue19873] There is a duplicate function in Lib/test/test_pathlib.py

2013-12-03 Thread Vajrasky Kok
Vajrasky Kok added the comment: These functions are only being used in test_resolve_common. def test_resolve_common(self): P = self.cls p = P(BASE, 'foo') with self.assertRaises(OSError) as cm: p.resolve() self.assertEqual(cm.exception.errno,

[issue19717] resolve() fails when the path doesn't exist

2013-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The readlink utility has different modes for canonization: -f, --canonicalize canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist -e,

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-03 Thread STINNER Victor
STINNER Victor added the comment: SA_RESTART doesn't need to be enforced. It's better to use it, but selectors and asyncio modules already handle EINTR error. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19850

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2013-12-03 Thread Vinay Sajip
Vinay Sajip added the comment: Since 3.4 entered beta last week, it is now in feature freeze, so only bug fixes are allowed, unfortunately. Since I did the ld patch I didn't want to commit it before getting another developer to review it, and it looks as if it just dropped under everyone's

[issue19874] test_logging failures on Snow Leopard

2013-12-03 Thread Antoine Pitrou
New submission from Antoine Pitrou: test_race in test_logging fails intermittently on the Snow Leopard buildbot: http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/741 == ERROR: test_race

[issue19875] test_getsockaddrarg occasional failure

2013-12-03 Thread Antoine Pitrou
New submission from Antoine Pitrou: It's on the FreeBSD 10.0 buildbot: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/1169 == ERROR: test_getsockaddrarg (test.test_socket.GeneralModuleTests)

[issue19665] test_logging fails with SMTPHandler timeout

2013-12-03 Thread Vinay Sajip
Vinay Sajip added the comment: I think the test is fragile, but I'll bump the timeout as suggested. -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19665 ___

[issue19717] resolve() fails when the path doesn't exist

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think every mode has use cases. Probably, but which ones are the most likely? A ternary flag leads to a clumsier API than a simple binary flag. -- ___ Python tracker rep...@bugs.python.org

[issue19665] test_logging fails with SMTPHandler timeout

2013-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4c5fc9f08b4d by Vinay Sajip in branch '3.3': Issue #19665: Increased timeout for SMTPHandler test. http://hg.python.org/cpython/rev/4c5fc9f08b4d New changeset bfd45dc46569 by Vinay Sajip in branch 'default': Closes #19665: Merged fi from 3.3.

[issue19874] test_logging failures on Snow Leopard

2013-12-03 Thread Vinay Sajip
Vinay Sajip added the comment: I think this is the same as #19690. -- resolution: - duplicate status: open - closed superseder: - test_logging test_race failed with PermissionError ___ Python tracker rep...@bugs.python.org

[issue19869] BaseCookie does not complain if a non RFC compliant cookie header was given

2013-12-03 Thread R. David Murray
R. David Murray added the comment: RFCs and cookies don't have much to do with each other in real life. The 'httponly' flag bug was fixed in issue 16611. For backward compatibility reasons we can't start raising errors where we didn't raise them before, so if anything is going to be done it

[issue19870] Backport Cookie fix to 2.7 (httponly / secure flag)

2013-12-03 Thread R. David Murray
R. David Murray added the comment: I'm not sure why that fix was not backported, so I think it should be OK to do so. 3.2 is in security fix only mode. No one argued that it was a securty issue when it was fixed in 3.3. -- nosy: +r.david.murray

[issue19734] venv and ensurepip are affected by pip environment variable settings

2013-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: Issue for the failure to detect a native venv: https://github.com/pypa/pip/issues/1358 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19734 ___

[issue19734] venv and ensurepip are affected by pip environment variable settings

2013-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: Issue for the lack of attention paid to sys.flags.ignore_environment: https://github.com/pypa/pip/issues/1359 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19734

[issue19734] venv and ensurepip are affected by pip environment variable settings

2013-12-03 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19734 ___

[issue19744] ensurepip should refuse to install pip if SSL/TLS is not available

2013-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: Relevant pip issue: https://github.com/pypa/pip/issues/1165 -- nosy: +larry priority: high - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19744

  1   2   3   >