Re: [Python-Dev] PEP 443 - Single-dispatch generic functions

2013-05-24 Thread Sam Partington
On 23 May 2013 22:02, Ronan Lamy ronan.l...@gmail.com wrote: 2013/5/23 Łukasz Langa luk...@langa.pl Last one wins. Just like with assigning names in a scope, defining methods in a class or overriding them in a subclass. This is a serious annoyance, considering that there are several places

Re: [Python-Dev] Improve error message UnboundLocalError: local variable referenced before assignment

2012-11-07 Thread Sam Partington
On 7 November 2012 13:57, Ulrich Eckhardt ulrich.eckha...@dominolaser.com wrote: Am 31.10.2012 23:15, schrieb Steven D'Aprano: I'll take a shot, since I was also bitten by this when trying to learn Python. The important point is that some code earlier or later in that function does an

Re: [Python-Dev] [Python-checkins] cpython (3.2): #14957: clarify splitlines docs.

2012-06-07 Thread Sam Partington
On Jun 2, 2012 6:21 AM, r.david.murray python-check...@python.org wrote: +   For example, ``'ab c\n\nde fg\rkl\r\n'.splitlines()`` returns +   ``['ab c', '', 'de fg', 'kl']``, while the same call with ``splinelines(True)`` +   returns ``['ab c\n', '\n, 'de fg\r', 'kl\r\n']`` Wouldn't that be

Re: [Python-Dev] Highlighting reference-stealing APIs [was Re: cpython: Fix email post-commit review comments.]

2012-04-19 Thread Sam Partington
On 19 April 2012 02:20, Nick Coghlan ncogh...@gmail.com wrote: On Thu, Apr 19, 2012 at 12:21 AM, Antoine Pitrou solip...@pitrou.net wrote: (and here we see why reference-stealing APIs are a nuisance: because you never know in advance whether a function will steal a reference or not, and you

Re: [Python-Dev] Use QueryPerformanceCounter() for time.monotonic() and/or time.highres()?

2012-04-02 Thread Sam Partington
On 30 March 2012 21:52, Guido van Rossum gu...@python.org wrote: Oh dear. I really want to say that 15 ms is good enough. Some possible exceptions I can think of: - Profiling. But this really wants to measure CPU time anyways, and it already uses a variety of hacks and heuristics to pick the

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-19 Thread Sam Partington
On 19 October 2011 00:18, Mark Hammond skippy.hamm...@gmail.com wrote: On 18/10/2011 8:59 PM, Sam Partington wrote: ... I added shebangs to all files as appropriate for devel/stable branch, and initially I changed the python build targets from python -utt build.py to ./build.py and I lost

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-18 Thread Sam Partington
On 17 October 2011 15:20, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Sam Partington sam.partington at gmail.com writes: That sounds like an explanation of why it hasn't been implemented before, not an explanation of why it should continue that way. From a desire to keep the launcher

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-18 Thread Sam Partington
On 18 October 2011 08:10, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: Is very unexpected. And to do so silently, without warning will cause It's only unexpected if you don't read the PEP. From there: The launcher may offer some conveniences for Python developers working interactively - for

[Python-Dev] PEP397 no command line options to python?

2011-10-17 Thread Sam Partington
Hello all, I was surprised to see that the excellent pylauncher doesn't do the magic shebang processing if you give it any python command line options. e.g. Given #!/usr/bin/env python2.6 import sys print(sys.executable) C:\py test.py C:\Python26\python.exe C:\py -utt test.py

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-17 Thread Sam Partington
On 17 October 2011 13:23, Mark Hammond skippy.hamm...@gmail.com wrote: On 17/10/2011 9:10 PM, Sam Partington wrote:   Only the first command-line argument will be checked for a shebang line    and only if that argument does not start with a '-'. But I can't really see why that should

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-17 Thread Sam Partington
On 17 October 2011 17:24, PJ Eby p...@telecommunity.com wrote: What about -S (no site.py) and -E (no environment)? These are needed for secure setuid scripts on *nix; I don't know how often they'd be used in practice on Windows. (Basically, they let you isolate a script's effective sys.path;