Template Data Interface (tdi) 0.9.9.8

2014-04-04 Thread André Malo
Hello World! I'm pleased to announce version 0.9.9.8 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

cliff -- Command Line Interface Formulation Framework -- version 1.6.0

2014-04-04 Thread Doug Hellmann
cliff -- Command Line Interface Formulation Framework -- version 1.6.0 cliff is a framework for building command line programs. It uses setuptools entry points to provide subcommands, output formatters, and other extensions. What's New In This Release? * Add max-width support for

CaptureMock 1.0 - true record/replay mocking for Python (and other things...)

2014-04-04 Thread Geoff Bache
Hi all, CaptureMock has come of age at last and reached 1.0. Many things have been fixed and improved since the last release. Notably: - Supports python callbacks in a limited fashion (i.e. intercepted code calling back into non-intercepted code) Makes it possible to e.g. intercept Tkinter

ANN: rom 0.26.1 - Redis object mapper for Pthon

2014-04-04 Thread Josiah Carlson
Hey everyone, The rom package is a Redis object mapper for Python. It sports an interface similar to Django's ORM, SQLAlchemy with the declarative base, or Appengine's datastore. The changelog for recent releases can be seen below my signature. You can find the package at:

Re: converting strings to hex

2014-04-04 Thread James Harris
Mark H Harris harrismh...@gmail.com wrote in message news:533e1b2e.5040...@gmail.com... On 4/3/14 9:10 PM, dave em wrote: I am taking a cryptography class and am having a tough time with an assignment similar to this. hi Dave, if your instructor wanted you to work on this with other people

Re: Unicode Chars in Windows Path

2014-04-04 Thread Lele Gaifax
Steven D'Aprano st...@pearwood.info writes: When working with Windows paths, you should make a habit of either escaping every backslash: uc:\\automation_common\\Python\\TestCases\\list_dir_script.txt using a raw-string: urc:\automation_common\Python\TestCases\list_dir_script.txt

Re: Yet Another Switch-Case Syntax Proposal

2014-04-04 Thread Steven D'Aprano
On Thu, 03 Apr 2014 15:11:38 -0400, Terry Reedy wrote: On 4/3/2014 12:02 PM, Lucas Malor wrote: A more suitable place to propose this would be the python-ideas mailing list. You're right. I posted here because this list was linked by PEP 1. But now that I read more there's also

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Steven D'Aprano
On Fri, 04 Apr 2014 09:43:15 +1100, Chris Angelico wrote: While I am interested in seeing a Decimal literal syntax in Python, and I would support a shift to have 1.2 evaluate as a Decimal (but not soon - it'd break backward compat *hugely*) I used to think the same thing, but have since

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Chris Angelico
On Fri, Apr 4, 2014 at 6:52 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: py x = Decimal(0.77787516) py y = Decimal(0.77787518) py (x + y) / 2 Decimal('0.77787515') I've changed my mind about Python using Decimal as the default numeric type. I think

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Ian Kelly
On Fri, Apr 4, 2014 at 1:52 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: py from decimal import * py getcontext().prec = 16 py x = Decimal(0.77787516) py y = Decimal(0.77787518) py (x + y) / 2 Decimal('0.77787515') Guido, why can't Python do

Re: converting strings to hex

2014-04-04 Thread Mark Lawrence
On 04/04/2014 04:22, dave em wrote: You haven't seen nothing yet, wait till M.L. catches you on the flip side for using gg. {running for cover} Who is ML? Good morning :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark Lawrence
On 04/04/2014 03:29, Mark H Harris wrote: Now, about Python2. It has not died. It appears to be 'useful'. The perceived reality is that Python2 is 'useful'. Or, is it as I perceive it, python2 is embedded in so many places that it must be maintained for a long time because so many

Re: Yet Another Switch-Case Syntax Proposal

2014-04-04 Thread Steven D'Aprano
On Thu, 03 Apr 2014 11:23:39 -0700, Ethan Furman wrote: On 04/03/2014 09:02 AM, Lucas Malor wrote: In reply to Ian Kelly: Instead of disabling fallthrough by default, why not disable it all together? I was tempted but there are cases in which it's useful. An example switch day casein

segmentation fault, executable python file

2014-04-04 Thread fanny
Hello, I generated an executable python file using cxfreeze. I run that file, it runs fine. But when I run it on another PC, it don't run. I try to it via terminal, and it says Segmentation fault(core dump). I try again run it with sudo, it says nothing and nothing happend. Could any of you

Re: segmentation fault, executable python file

2014-04-04 Thread Chris Angelico
On Fri, Apr 4, 2014 at 7:36 PM, fa...@itprovent.com wrote: Hello, I generated an executable python file using cxfreeze. I run that file, it runs fine. But when I run it on another PC, it don't run. I try to it via terminal, and it says Segmentation fault(core dump). I try again run it with

Re: segmentation fault, executable python file

2014-04-04 Thread fanny
the first one is ubuntu 12.04 64-bit (where i generate the executable file), and the second one is the same. Any idea? I confused for days until today. Thanks for your replay On Friday, April 4, 2014 3:57:33 PM UTC+7, Chris Angelico wrote: On Fri, Apr 4, 2014 at 7:36 PM, fa...@itprovent.com

Re: segmentation fault, executable python file

2014-04-04 Thread Chris Angelico
On Fri, Apr 4, 2014 at 8:06 PM, fa...@itprovent.com wrote: the first one is ubuntu 12.04 64-bit (where i generate the executable file), and the second one is the same. Any idea? I confused for days until today. Thanks for your replay That's a good start. Next thing to try is running your

Re: Yet Another Switch-Case Syntax Proposal

2014-04-04 Thread Marko Rauhamaa
Instead of disabling fallthrough by default, why not disable it all together? I was tempted but there are cases in which it's useful. An example No, it is never useful, it never was. It came into being by accident, a design bug turned into an advertised feature. switch day casein (Monday,

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Steven D'Aprano
On Thu, 03 Apr 2014 11:38:13 -0500, Mark H Harris wrote: On 4/1/14 5:33 PM, Terry Reedy wrote: hi Terry, hope you are well today, despite gmane difficulties; If you narrowly meant The python interpreter only starting using unicode as the default text class in 3.0, then you are, in

Re: converting strings to hex

2014-04-04 Thread alister
On Thu, 03 Apr 2014 21:38:38 -0500, Mark H Harris wrote: On 4/3/14 9:10 PM, dave em wrote: I am taking a cryptography class and am having a tough time with an assignment similar to this. hi Dave, if your instructor wanted you to work on this with other people she would have made it a

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Steven D'Aprano
On Fri, 04 Apr 2014 02:13:13 -0600, Ian Kelly wrote: On Fri, Apr 4, 2014 at 1:52 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: py from decimal import * py getcontext().prec = 16 py x = Decimal(0.77787516) py y = Decimal(0.77787518) py (x + y) / 2

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Rustom Mody
On Friday, April 4, 2014 3:23:31 PM UTC+5:30, Steven D'Aprano wrote: On Thu, 03 Apr 2014 11:38:13 -0500, Mark H Harris wrote: On 4/1/14 5:33 PM, Terry Reedy wrote: hi Terry, hope you are well today, despite gmane difficulties; If you narrowly meant The python interpreter only

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Terry Reedy
On 4/4/2014 5:53 AM, Steven D'Aprano wrote: On Thu, 03 Apr 2014 11:38:13 -0500, Mark H Harris wrote: On 4/1/14 5:33 PM, Terry Reedy wrote: If you narrowly meant The python interpreter only starting using unicode as the default text class in 3.0, then you are, in that narrow sense, correct.

Re: segmentation fault, executable python file

2014-04-04 Thread Jurko Gospodnetić
Hi. On 4.4.2014. 11:17, Chris Angelico wrote: But from here you need someone more familiar with cxfreeze. All I can advise is to compare installed packages on each; maybe you have multiple versions of some library or something. From what little I know of it, it freezes as little as

CFP: MuCoCoS-2014, August, Porto, Portugal

2014-04-04 Thread SP
7th International Workshop on Multi/many-Core Computing Systems (MuCoCoS-2014) in conjunction with Euro-Par 2014 25-29 August, 2014, Porto, Portugal http://www.univie.ac.at/mucocos2014 AIMS AND SCOPE The

Re: Default mutable parameters in functions

2014-04-04 Thread random832
On Thu, Apr 3, 2014, at 20:38, Mark Lawrence wrote: I just wish I had a quid for every time somebody expects something out of Python, that way I'd have retired years ago. At least here it's not accompanied by as that's how it works in some other language. I can't imagine a language that

Jesus: an Islamic view

2014-04-04 Thread bv4bv4bv4
Jesus: an Islamic view In this pamphlet, the author shows the nature of the Prophet Jesus as Islam provides. He shows that the Prophet Jesus is a human prophet and does not have any divine nature as Christian believe. Did you know that it is obligatory for Muslims to believe in Jesus, or

Re: Default mutable parameters in functions

2014-04-04 Thread Steven D'Aprano
On Fri, 04 Apr 2014 10:00:25 -0400, random832 wrote: On Thu, Apr 3, 2014, at 20:38, Mark Lawrence wrote: I just wish I had a quid for every time somebody expects something out of Python, that way I'd have retired years ago. At least here it's not accompanied by as that's how it works in some

Re: Yet Another Switch-Case Syntax Proposal

2014-04-04 Thread Ian Kelly
On Apr 4, 2014 3:51 AM, Marko Rauhamaa ma...@pacujo.net wrote: switch day casein (Monday, Thursday, Wednesday, Tuesday, Friday): gotowork = True continue casein (Monday, Thursday, Wednesday, Tuesday, Friday): daytype = ferial casein (Saturday, Sunday) daytype =

Re: Yet Another Switch-Case Syntax Proposal

2014-04-04 Thread Devin Jeanpierre
If one were to add switch into Python, wouldn't it be desirable to make a pattern matching switch (think the match or case construct from Haskell or ML)? Python currently has poor support for union/sum types in general, not just enumerations. It feels weird to add better support for enumerations

Re: Yet Another Switch-Case Syntax Proposal

2014-04-04 Thread Marko Rauhamaa
Ian Kelly ian.g.ke...@gmail.com: On Apr 4, 2014 3:51 AM, Marko Rauhamaa ma...@pacujo.net wrote: switch: local_sabbath() case (1, 2, 3) as sabbath: ... case 6: ... else: ... [...] What's wrong with the much more natural switch local_sabbath():?

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Ian Kelly
On Fri, Apr 4, 2014 at 4:08 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 04 Apr 2014 02:13:13 -0600, Ian Kelly wrote: On Fri, Apr 4, 2014 at 1:52 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: py from decimal import * py getcontext().prec = 16 py

Re: Yet Another Switch-Case Syntax Proposal

2014-04-04 Thread Ian Kelly
On Fri, Apr 4, 2014 at 10:44 AM, Marko Rauhamaa ma...@pacujo.net wrote: Consider: switch local_sabbath():# bad case (1, 2, 3) as sabbath: ... I'm not overly fond of that either. That's why I liked the OP's choice to put the first case in the switch statement. Now

Scoping rules for class definitions

2014-04-04 Thread Rotwang
Hi all. I thought I had a pretty good grasp of Python's scoping rules, but today I noticed something that I don't understand. Can anyone explain to me why this happens? x = 'global' def f1(): x = 'local' class C: y = x return C.y def f2(): x = 'local' class C:

Re: Scoping rules for class definitions

2014-04-04 Thread Ian Kelly
On Fri, Apr 4, 2014 at 12:37 PM, Rotwang sg...@hotmail.co.uk wrote: Hi all. I thought I had a pretty good grasp of Python's scoping rules, but today I noticed something that I don't understand. Can anyone explain to me why this happens? x = 'global' def f1(): x = 'local' class C:

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 3:20 AM, Mark Lawrence wrote: On 04/04/2014 03:29, Mark H Harris wrote: Now, about Python2. It has not died. It appears to be 'useful'. {snip} For a lot of people, if it ain't broke, don't fix it. hi Mark, yes that's my point. I have heard rumors of python2.8? At some

Re: converting strings to hex

2014-04-04 Thread Mark H Harris
On 4/4/14 1:16 AM, James Harris wrote: YMMV but I thought the OP had done a good job before asking for help and then asked about only a tiny bit of it. Some just post a question! Indeed they do. Its a little like negotiating with terrorists. As soon as you negotiate with the first one, you

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Ian Kelly
On Fri, Apr 4, 2014 at 2:58 PM, Mark H Harris harrismh...@gmail.com wrote: On 4/4/14 3:20 AM, Mark Lawrence wrote: On 04/04/2014 03:29, Mark H Harris wrote: Now, about Python2. It has not died. It appears to be 'useful'. {snip} For a lot of people, if it ain't broke, don't fix it.

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark Lawrence
On 04/04/2014 21:58, Mark H Harris wrote: On 4/4/14 3:20 AM, Mark Lawrence wrote: On 04/04/2014 03:29, Mark H Harris wrote: Now, about Python2. It has not died. It appears to be 'useful'. {snip} For a lot of people, if it ain't broke, don't fix it. hi Mark, yes that's my point. I

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 4:50 PM, Mark Lawrence wrote: You could answer all of the above for yourself if you were to use your favourite search engine. hi Mark, yeah, condescending as that is, been there done that. See this link as just one example:

Re: converting strings to hex

2014-04-04 Thread Chris Angelico
On Sat, Apr 5, 2014 at 8:33 AM, Mark H Harris harrismh...@gmail.com wrote: On 4/4/14 1:16 AM, James Harris wrote: YMMV but I thought the OP had done a good job before asking for help and then asked about only a tiny bit of it. Some just post a question! Indeed they do. Its a little like

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Chris Angelico
On Sat, Apr 5, 2014 at 9:07 AM, Mark H Harris harrismh...@gmail.com wrote: On 4/4/14 4:50 PM, Mark Lawrence wrote: You could answer all of the above for yourself if you were to use your favourite search engine. hi Mark, yeah, condescending as that is, been there done that. Its always

Re: Default mutable parameters in functions

2014-04-04 Thread Chris Angelico
On Sat, Apr 5, 2014 at 1:34 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: But it's not hard to get that effect in Python, mutable or immutable doesn't matter: py def spam(count, food=spam): ... spam.__defaults__ = (food,) ... return food*count ... py spam(5)

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 5:39 PM, Chris Angelico wrote: Yes, because python-list responses are *so* much more reliable than official statements on python.org, {/sarcasm off} ... from some responders. The discussion following such posts is also *much* more valuable, too. IMHO Python.org is the political

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Chris Angelico
On Sat, Apr 5, 2014 at 9:52 AM, Mark H Harris harrismh...@gmail.com wrote: On 4/4/14 5:39 PM, Chris Angelico wrote: Yes, because python-list responses are *so* much more reliable than official statements on python.org, {/sarcasm off} ... from some responders. The discussion following such

Re: converting strings to hex

2014-04-04 Thread Mark H Harris
On 4/4/14 5:36 PM, Chris Angelico wrote: If someone is asking for a hint, it's because s/he is trying to learn. I'm always willing to help someone learn, regardless of whether they're going through a course or currently employed or whatever. Sometimes a small hint can be obtained from the

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark Lawrence
On 04/04/2014 23:52, Mark H Harris wrote: As Ian points out, you can't expect a complete migration on the PSF schedule (2-3), because of the fear|panic of a fork. So, comp.lang.python is the best place to find out where the Cpython community is, and where they expect to go (for that

Re: Default mutable parameters in functions

2014-04-04 Thread Roy Smith
In article mailman.8908.1396653807.18130.python-l...@python.org, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Fri, 04 Apr 2014 10:00:25 -0400, random...@fastmail.us declaimed the following: I can't imagine a language that would work that way. For one, it would also imply that

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Steven D'Aprano
On Fri, 04 Apr 2014 15:58:29 -0500, Mark H Harris wrote: Oh, I have another serious question about implementations. I'm not sure about (50) implementations, Here's a list. Which ones you count as actual implementations of Python and which are not may be a matter of opinion. (Do translators

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Steven D'Aprano
On Fri, 04 Apr 2014 11:01:48 -0600, Ian Kelly wrote: On Fri, Apr 4, 2014 at 4:08 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 04 Apr 2014 02:13:13 -0600, Ian Kelly wrote: On Fri, Apr 4, 2014 at 1:52 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Chris Angelico
On Sat, Apr 5, 2014 at 11:00 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: As I said, some of these may be abandoned, obsolete, experimental, or even vapourware. Some are probably just ports of CPython to another platform rather than completely independent implementations.

Re: Default mutable parameters in functions

2014-04-04 Thread Dave Angel
Dennis Lee Bieber wlfr...@ix.netcom.com Wrote in message: On Fri, 04 Apr 2014 10:00:25 -0400, random...@fastmail.us declaimed the following: I can't imagine a language that would work that way. For one, it would also imply that passing a value would change the default for future calls even

process do not join?

2014-04-04 Thread xeon Mailinglist
I am trying to debug my program that launch processes to run a function to copy data between hosts located really far away from each other. The end of my function are in the orders.py and mergedirs.py. From this point onwards, in is python code. The problem is that this code hangs in the last

Re: process do not join?

2014-04-04 Thread xeon Mailinglist
This log came when I launched the command: python -m trace --trace myclass.py On Saturday, April 5, 2014 3:18:34 AM UTC+1, xeon Mailinglist wrote: I am trying to debug my program that launch processes to run a function to copy data between hosts located really far away from each other. The

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Terry Reedy
On 4/4/2014 6:07 PM, Mark H Harris wrote: On 4/4/14 4:50 PM, Mark Lawrence wrote: You could answer all of the above for yourself if you were to use your favourite search engine. hi Mark, yeah, condescending as that is, been there done that. Since there *are* people who use python-list as a

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Chris Angelico
On Sat, Apr 5, 2014 at 2:04 PM, Terry Reedy tjre...@udel.edu wrote: I am a core developer and I am 99.99% sure that the core developers will not produce a CPython 2.8. For one thing we will likely do instead, see http://legacy.python.org/dev/peps/pep-0466/ There's also been talk of a potential

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Rustom Mody
On Saturday, April 5, 2014 2:28:29 AM UTC+5:30, Mark H. Harris wrote: hi Mark, yes that's my point. I have heard rumors of python2.8? At some point I would expect that the Cpython interpreter would 'freeze' and no one would fix it any longer. I have a serious question, namely, why does the

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Terry Reedy
On 4/4/2014 11:22 PM, Chris Angelico wrote: On Sat, Apr 5, 2014 at 2:04 PM, Terry Reedy tjre...@udel.edu wrote: I am a core developer and I am 99.99% sure that the core developers will not produce a CPython 2.8. For one thing we will likely do instead, see

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 6:16 PM, Mark Lawrence wrote: Fear/panic of a fork, where did that come from? It's certainly the first I've ever heard of it. hi Mark, it came from Ian; or, my interpretation of Ian. It comes out on the net too (from various places). Here is Ian's quote, then my comment:

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 10:04 PM, Terry Reedy wrote: I am a core developer and I am 99.99% sure that the core developers will not produce a CPython 2.8. For one thing we will likely do instead, see http://legacy.python.org/dev/peps/pep-0466/ Thanks Terry. The back-port sounds great; I find the Rejected

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 7:00 PM, Steven D'Aprano wrote: Berp, Brython, CLPython, CPython, CapPython, ChinesePython, Compyler, Copperhead, Cython, HoPe, HotPy, IronPython, Jython, Kivy, Mypy, Mython, Nuitka, Numba, Parakeet, Parallel Python, Perthon, Pippy, Psyco, Py4A, PyMite, PyMT, PyPad, PyPy, PyQNX, PyVM,

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Chris Angelico
On Sat, Apr 5, 2014 at 3:10 PM, Mark H Harris harrismh...@gmail.com wrote: we don't want folks to be driven away from Cpython as a language, and we don't want them to fork the Cpython interpreter, so we'll take a very casual and methodically conservative approach to nudging people towards a

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Chris Angelico
On Sat, Apr 5, 2014 at 3:31 PM, Mark H Harris harrismh...@gmail.com wrote: Its has always seemed to me that Java or C++ would be better suited to creating python. I wonder will C always be the standard canonical PSF python interpreter base language? Has the C python community considered

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Ian Kelly
On Fri, Apr 4, 2014 at 10:10 PM, Mark H Harris harrismh...@gmail.com wrote: On 4/4/14 6:16 PM, Mark Lawrence wrote: Fear/panic of a fork, where did that come from? It's certainly the first I've ever heard of it. hi Mark, it came from Ian; or, my interpretation of Ian. It comes out on the

About threading.Thread

2014-04-04 Thread 张佩佩
Hello guys: I have an question on threading.Thread My code is here: File1: a.py import threading import time def hello(): while True: print('hello') threads = threading.enumerate() for thread in threads:

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 10:42 PM, Rustom Mody wrote: Computer-hobbyists and computer-professionals are quite different sets of people. I know its just a gut feel, and I know there are a lot of lurkers here too, but it seems that there are *way* more folks from the professional camp on comp.lang.python

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Ian Kelly
On Fri, Apr 4, 2014 at 10:40 PM, Chris Angelico ros...@gmail.com wrote: On Sat, Apr 5, 2014 at 3:10 PM, Mark H Harris harrismh...@gmail.com wrote: we don't want folks to be driven away from Cpython as a language, and we don't want them to fork the Cpython interpreter, so we'll take a very

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 11:40 PM, Chris Angelico wrote: If it's too much work to make the changes to move something from Python 2.7 to Python 3.3, it's *definitely* too much work to rewrite it in a different language. Totally, no doubt. There would have to be some strong other reason for shifting,

Re: About threading.Thread

2014-04-04 Thread Chris Angelico
On Sat, Apr 5, 2014 at 4:02 PM, 张佩佩 zhangpeipei...@outlook.com wrote: def fun(): a = threading.Thread(target=hello(), name='hello') It seems that threading.Thread() in file1 not create a new thread but use MainThread. Anyone can explain this ? Thank you in advance. Suggestion: Cut

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Chris Angelico
On Sat, Apr 5, 2014 at 4:02 PM, Mark H Harris harrismh...@gmail.com wrote: I know its just a gut feel, and I know there are a lot of lurkers here too, but it seems that there are *way* more folks from the professional camp on comp.lang.python than otherwise. Do you have a gut feel for the %

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/4/14 11:49 PM, Chris Angelico wrote: On Sat, Apr 5, 2014 at 3:31 PM, Mark H Harris harrismh...@gmail.com wrote: Its has always seemed to me that Java or C++ would be better suited to creating python. I wonder will C always be the standard canonical PSF python interpreter base language?

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Ben Finney
Chris Angelico ros...@gmail.com writes: I would suggest that the more prolific posters are going to be those who use Python more (and thus it's worth investing more time in), which is going to skew the post stats towards the professional end of the spectrum. It's also plausible that the more

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Mark H Harris
On 4/5/14 12:02 AM, Ian Kelly wrote: A fork is undesirable because it fragments the community. I don't think fear or panic are the right words for it. Yes. I get that. I think what is desired (just thinking out loud from my own vantage point) is a unified community, but also a foundation

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-04-04 Thread Chris Angelico
On Sat, Apr 5, 2014 at 4:23 PM, Mark H Harris harrismh...@gmail.com wrote: The only advantage of C++ over C is polymorphism, really. There are in my view only three reasons to even use C++: 1) the iostream library, and 2) polymorphism, and 3) operator overloading. If you need to do all three,

[issue21136] fractions.Fraction.__pow__ does unneeded renormalization

2014-04-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Mark, that is an excellent suggestion. -- Added file: http://bugs.python.org/file34719/fraction_pow2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21136

[issue20969] Author of EPUB version of Python docs is set to Unknown instead of PSF

2014-04-04 Thread Christian Clauss
Christian Clauss added the comment: Makefile and make.bat in https://github.com/python/pythondotorg/blob/master/docs are NOT the correct files to modify. It is unclear to where the correct files are. -- ___ Python tracker rep...@bugs.python.org

[issue21116] Failure to create multiprocessing shared arrays larger than 50% of memory size under linux

2014-04-04 Thread Médéric Boquien
Médéric Boquien added the comment: Thanks for the explanations Charles-François. I guess the new API would not be before 3.5 at least. Is there still a chance to integrate my patch (or any other) to improve the situation for the 3.4 series though? --

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-04-04 Thread Andreas Schwab
Andreas Schwab added the comment: Finn Thain fth...@telegraphics.com.au writes: until Aranym gets fixed. Aranym *is* fixed. Andreas. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20904

[issue1191964] asynchronous Subprocess

2014-04-04 Thread Josiah Carlson
Josiah Carlson added the comment: Quick update before I head to bed. Thank you for the input, I had gotten the individual async calls working a couple days ago, and I was just working to replace the communicate() method for Windows. Yes, I'm using asyncio._overlapped, though asyncio uses

[issue20375] ElementTree: Document handling processing instructions

2014-04-04 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- resolution: - fixed stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20375 ___

[issue19491] Python Crashing When Saving Documents

2014-04-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am closing this on the theory that the problem has been fixed by one of the many crash fixers since 3.2. There is certainly insufficient information to act on. Currently, a problem would have to be demonstrated with 3.4 (or possible 2.7). --

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-04-04 Thread mirabilos
mirabilos added the comment: Andreas Schwab dixit: Finn Thain fth...@telegraphics.com.au writes: Sorry, what? You seek to veto an upstream Python bug fix because it will lead to correct binaries that a certain emulator can't handle? That Yes, because of the value ARAnyM has for Linux/m68k

[issue21152] Idle: timed autosave for shell (and maybe editor) window

2014-04-04 Thread Terry J. Reedy
New submission from Terry J. Reedy: From #21140, msg215485, Raymond Hettinger: Students commonly save shell sessions as a record of everything they tried in call. It would nice if there were a way to trigger a periodic autosave (perhaps every five minutes or so). -- components: IDLE

[issue21140] Idle: saving an OutputWindow should default to .txt

2014-04-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Raymond, I open #21152 with your idea. #11838 and #19042 are somewhat related but timed autosave is not a part of either. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21140

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-04-04 Thread Andreas Schwab
Andreas Schwab added the comment: The fixed version is here: git://git.code.sf.net/p/aranym/code Andreas. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20904 ___

[issue21128] testing stdlib and compatibility with pypy

2014-04-04 Thread mattip
mattip added the comment: Correct, the other patches were against pypy, sorry. I now patched and tested against banch 2.7 on the python tree. -- Added file: http://bugs.python.org/file34720/patch ___ Python tracker rep...@bugs.python.org

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-04-04 Thread Stefan Krah
Stefan Krah added the comment: If the asm instructions silently fail, I'd say add a test to ./configure that detects the broken versions of the emulator in question. Or don't bother and tell people to use the proper version of the emulator. -- ___

[issue20969] Author of EPUB version of Python docs is set to Unknown instead of PSF

2014-04-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: The PSF is not the author of the docs. Perhaps something like Python documentation authors. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20969

[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-04-04 Thread Andreas Schwab
Andreas Schwab added the comment: There is nothing that fails. The emulator has always correctly implemented the insn. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20904 ___

[issue21128] testing stdlib and compatibility with pypy

2014-04-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm wondering why resource warnings are not raised in CPython? ./python -Werror -bb -m test.regrtest -uall test_argparse test_file test_httpservers -- ___ Python tracker rep...@bugs.python.org

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2014-04-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset b6deab7204e6 by Vinay Sajip in branch '2.7': Issue #21149: Improved thread-safety in logging cleanup during interpreter shutdown. http://hg.python.org/cpython/rev/b6deab7204e6 New changeset b5c91b61991a by Vinay Sajip in branch '3.4': Issue

[issue21153] bdist_rpm fails if project contains files with spaces in the names

2014-04-04 Thread Jason R. Coombs
New submission from Jason R. Coombs: In https://bitbucket.org/pypa/setuptools/issue/178, Eduard reported an issue that setuptools fails to install due to files in its structure with spaces in the filenames. These files have been around for some time (over two years in Distribute), but are now

[issue21153] bdist_rpm fails if project contains files with spaces in the names

2014-04-04 Thread Jason R. Coombs
Jason R. Coombs added the comment: The attached script (issue21153.py) replicates the failure in a Unix environment with the 'rpm' command present. -- Added file: http://bugs.python.org/file34721/issue21153.py ___ Python tracker

[issue21130] equivalent functools.partial instances should compare equal

2014-04-04 Thread Thomas Heller
Thomas Heller added the comment: My usecase is: I create kind of bound methods with functools.partial. Apologies for the confusion by using the word 'equivalent'; what I mean is that partial instances should (IMO) compare equal when they contain the same function and args/keywords which

[issue17522] Add api PyGILState_Check

2014-04-04 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17522 ___ ___

[issue16475] Support object instancing and recursion in marshal

2014-04-04 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16475 ___ ___

[issue17969] multiprocessing crash on exit

2014-04-04 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Closing this as won-t fix. Exiting with running threads is a can of worms. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17969

[issue8410] Fix emulated lock to be 'fair'

2014-04-04 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Closing this issue. It is largely superseded. For our Python 2.7 branches, we have a custom GIL lock which can have different inherent semantics from the common Lock. In particular, we can implement a fair PyGIL_Handoff() function to be used to

[issue8410] Fix emulated lock to be 'fair'

2014-04-04 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- resolution: - rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8410 ___ ___

[issue17969] multiprocessing crash on exit

2014-04-04 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- resolution: - wont fix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17969 ___ ___

  1   2   >