Re: [Python-Dev] standard libraries don't behave like standard 'libraries'

2009-11-13 Thread Steven D'Aprano
27;t. I think the std library could possibly be organised better, but just because something isn't useful to me right now, doesn't mean it isn't useful to someone, and may be useful to me tomorrow. -- Steven D'Aprano ___ Python-Dev

Re: [Python-Dev] PyPI comments and ratings, *really*?

2009-11-13 Thread Steven D'Aprano
ut for the life of me, I can't understand the 1/3 of the votes that have been cast in favour of prohibiting comments for everybody, even those who want comments. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mai

Re: [Python-Dev] PyPI comments and ratings, *really*?

2009-11-13 Thread Steven D'Aprano
three choices for allowing comments, two for disallowing. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PyPI comments and ratings, *really*?

2009-11-13 Thread Steven D'Aprano
s, with two-thirds in favour of allowing them. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PyPI comments and ratings, *really*?

2009-11-13 Thread Steven D'Aprano
On Sat, 14 Nov 2009 10:19:17 am Steven D'Aprano wrote: > On Sat, 14 Nov 2009 09:17:40 am Jacob Kaplan-Moss wrote: > > This "poll" business is just smoke and mirrors, anyway -- notice > > the way the "no comments" votors are split among three choices, >

Re: [Python-Dev] PyPI comments and ratings, *really*?

2009-11-14 Thread Steven D'Aprano
ple like Paul, but because the alternatives -- easy comment spam, people voting multiple times -- are worse than some proportion of users being unable to vote. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] Request for review of issue 4037

2010-02-09 Thread Steven D'Aprano
it. Thank you. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] math.hypot, complex.__abs__, and documentation

2010-02-16 Thread Steven D'Aprano
ell, and FWIW, I personally agree with this > convention. What's the justification for that convention? It seems wrong to me. If you expand out hypot and substitute a=inf and b=nan, you get: >>> math.sqrt(inf*inf + nan*nan) nan which agrees with my pencil-and-paper calculatio

Re: [Python-Dev] math.hypot, complex.__abs__, and documentation

2010-02-17 Thread Steven D'Aprano
On Wed, 17 Feb 2010 10:06:01 am Mark Dickinson wrote: > On Tue, Feb 16, 2010 at 10:46 PM, Steven D'Aprano > > > > What's the justification for that convention? It seems wrong to me. > > It's difficult to do better than to point to Kahan's writings. See

Re: [Python-Dev] __file__

2010-02-26 Thread Steven D'Aprano
7;re all adults here. I do recall a poster on comp.lang.python pulling his hair out over a customer who was too big to fire, but who had the obnoxious habit of making random so-called "fixes" to the poster's .py files, so perhaps byte-code only distribution isn't all bad.

Re: [Python-Dev] Another version of Python

2010-02-26 Thread Steven D'Aprano
tion is extensive and rapidly changing, so I think it would be better to have the current implementation page be fairly minimal but link to the wiki for more details: http://wiki.python.org/moin/implementation http://www.python.org/dev/implementations/ -- Steven D'Aprano _

Re: [Python-Dev] __file__

2010-03-02 Thread Steven D'Aprano
description given. I imagine there will be recipes on ActiveState quite quickly, and if there isn't, that would be good evidence that demand for the feature is low. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.

Re: [Python-Dev] __file__

2010-03-02 Thread Steven D'Aprano
e created, just like today. BTW, you have some sort of automated warning in the PEP: System Message: WARNING/2 (pep-3147.txt, line 237) Title underline too short. http://www.python.org/dev/peps/pep-3147/#id47 -- Steven D'Aprano ___ Py

Re: [Python-Dev] __file__ and bytecode-only

2010-03-14 Thread Steven D'Aprano
xcusable. This is not the place for me to rant over the evil that is dot files, so I'll just say this: Python works on platforms other than Unix/Linux, and some of those platforms don't treat dot files as anything more than a file with a

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-16 Thread Steven D'Aprano
comparisons, which will always return a bool, and will avoid the current ... interesting ... behaviour. In 3.1: >>> Decimal(1) == 1 == 1.0 True >>> Decimal(1) == 1.0 False >>> Decimal.from_float(1.0) == 1 == 1.0 True >>> Decimal.from_float(1.0) ==

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-16 Thread Steven D'Aprano
e has to be explicit about how to do it. More explicit than someDecimal == someFloat? Seems pretty explicit to me. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-17 Thread Steven D'Aprano
e will be confused by this too: >>> x = 1.0/3 >>> x + 1.0 - 1.0 == x False There's an awful lot about floats that is confusing to naive users, I don't see that the behaviour of Decimals will make it worse. -- Steven D'Aprano __

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-17 Thread Steven D'Aprano
On Wed, 17 Mar 2010 10:01:12 am Guido van Rossum wrote: > On Tue, Mar 16, 2010 at 2:32 PM, Steven D'Aprano wrote: > > But mixed arithmetic runs into the problem, what do you want the > > result type to be? Given (say) decimal+float, returning either a > > Decimal or

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-17 Thread Steven D'Aprano
ht answer it is better than not? -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-18 Thread Steven D'Aprano
On Thu, 18 Mar 2010 08:58:25 am Raymond Hettinger wrote: > On Mar 17, 2010, at 1:59 PM, Steven D'Aprano wrote: > > On Thu, 18 Mar 2010 07:44:21 am Raymond Hettinger wrote: > >> The spectrum of options from worst to best is > >> 1) compare but give the wrong ans

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-18 Thread Steven D'Aprano
everyone live with making float<->Decimal comparisons raise an > exception in 2.7? Yes. I would far prefer an exception than the current incorrect results in 2.6. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Decimal <-> float comparisons in py3k.

2010-03-18 Thread Steven D'Aprano
One can only wonder why the various standards (actual and de-facto) for floating point allows comparisons at all. But they do, and so does Python, and frankly even if the only reason is to satisfy lazy coders who don't have a requirement for high accur

Re: [Python-Dev] Mixing float and Decimal -- thread reboot

2010-03-19 Thread Steven D'Aprano
_ import ..." except it's > a permanent part of the language rather than a forward compatibility > feature.) That's far more ambitious than I was willing to even imagine, but now that you've suggested it, I like it. -- Steven D'Aprano __

Re: [Python-Dev] Decimal & amp; lt; -& amp; gt; float comparisons in py3k.

2010-03-21 Thread Steven D'Aprano
the only surprise: >>> x = Decimal("NAN"); x == x False Decimals are floats, but using radix 10 instead of radix 2. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Mixing float and Decimal -- thread reboot

2010-03-21 Thread Steven D'Aprano
ingle warning per session would be okay, a warning after every operation would be excessive in my opinion, and exceptions by default would be right out. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://m

Re: [Python-Dev] __pycache__ creation

2010-03-23 Thread Steven D'Aprano
ds, but then import can't write to the freshly created directory? That's just weird, so I'm +0 on raising a warning and -1 on raising an exception. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mai

Re: [Python-Dev] PEP 3147, __pycache__ directories and umask

2010-03-23 Thread Steven D'Aprano
usernames (note plural) to store them under. It is not true that one can necessarily delete the cached files without data loss. Python still supports .pyc-only packages, and AFAIK there are no plans to stop that, so deleting the .pyc file may delete the module. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Mixing float and Decimal -- thread reboot

2010-03-23 Thread Steven D'Aprano
#x27;) > >>> s = {x} > >>> x in s > True As usual though, NANs are unintuitive: >>> d = {float('nan'): 1} >>> d[float('nan')] = 2 >>> d {nan: 1, nan: 2} I suspect that's a feature, not a bug. -- Steven D'Ap

Re: [Python-Dev] Mixing float and Decimal -- thread reboot

2010-03-24 Thread Steven D'Aprano
On Wed, 24 Mar 2010 08:51:36 pm Mark Dickinson wrote: > On Wed, Mar 24, 2010 at 5:36 AM, Stephen J. Turnbull wrote: > > Steven D'Aprano writes: > > > >  > As usual though, NANs are unintuitive: > >  > > >  > >>> d = {float('nan

Re: [Python-Dev] Mixing float and Decimal -- thread reboot

2010-03-24 Thread Steven D'Aprano
On Wed, 24 Mar 2010 10:47:26 pm Nick Coghlan wrote: > Steven D'Aprano wrote: > > On Wed, 24 Mar 2010 08:51:36 pm Mark Dickinson wrote: > >>> I don't see how it can be so. Aren't all of those entries > >>> garbage? To compute a histogram of results f

Re: [Python-Dev] Mixing float and Decimal -- thread reboot

2010-03-24 Thread Steven D'Aprano
inst the idea: -1 on interning NaNs. For the rare application where it might be useful, it is easy to do in the application code. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/py

Re: [Python-Dev] Mixing float and Decimal -- thread reboot

2010-03-25 Thread Steven D'Aprano
what algorithms are there that rely on NaN == NaN being True? -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Why is nan != nan?

2010-03-25 Thread Steven D'Aprano
d -inf, corresponding to the infinities on the real number line. (I hope that I'm not over-simplifying -- it's been more than a decade since I've needed to care about this.) But in any case, the IEEE standard doesn't deal with cardinals: it only uses two signed infinities

Re: [Python-Dev] Mixing float and Decimal -- thread reboot

2010-03-25 Thread Steven D'Aprano
On Thu, 25 Mar 2010 10:25:35 pm Nick Coghlan wrote: > Steven D'Aprano wrote: > > I'd like to turn the question around ... what algorithms are there > > that rely on NaN == NaN being True? > > Absolutely anything that expects "x is y" to imply that "x =

Re: [Python-Dev] Why is nan != nan?

2010-03-25 Thread Steven D'Aprano
* of garbage you've got (the payload): INF-INF is, in some sense, a different kind of error to log(-1). In the same way you might say "INF-INF could be any number at all, therefore we return NAN", you might say "since INF-INF could be anything, there's no reason to think that INF-INF == INF-INF." -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Why is nan != nan?

2010-03-25 Thread Steven D'Aprano
y NAN, including itself. However, I would be -0 on the following compromise: Allow NANs to test equal to themselves (identity testing). math module to grow a function ieee_equals(x, y) that keeps the current behaviour. -- Steven D'Aprano ___ Pyth

Re: [Python-Dev] Why is nan != nan?

2010-03-26 Thread Steven D'Aprano
On Fri, 26 Mar 2010 12:19:06 pm P.J. Eby wrote: > At 11:57 AM 3/26/2010 +1100, Steven D'Aprano wrote: > >But they're not -- they're *signals* for "your calculation has gone > >screwy and the result you get is garbage", so to speak. You > >should

Re: [Python-Dev] Optional delta argument for assertAlmostEqual

2010-03-28 Thread Steven D'Aprano
26, 2010 at 7:59 PM, Michael Foord wrote: > > Hello all, > > > > A user has suggested an optional argument to > > unittest.TestCase.assertAlmostEqual for specifying a maximum > > difference between the expected and actual values, instead of using > > rounding. [sni

Re: [Python-Dev] Why is nan != nan?

2010-03-28 Thread Steven D'Aprano
error. +1 on leaving the behaviour alone -- the surprising behaviour people have pointed out with NANs in lists, dicts and sets occurs more often in theory than in practice. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python

Re: [Python-Dev] nonlocals() function?

2010-04-04 Thread Steven D'Aprano
much need for a nonlocals() function. I suspect it's a solution in search of a problem, but the same holds for locals() (in my option) and so I wouldn't object if somebody else volunteered to do the work :) +0 -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Scope object (Re: nonlocals() function?)

2010-04-06 Thread Steven D'Aprano
the various writings by Professor Kahan: http://www.drdobbs.com/184410314 http://www.cs.berkeley.edu/~wkahan/ Most of the issues discussed apply to languages that deal with floats at a lower level than Python does, but still, simple minded optimizations will break corner cases no matter

Re: [Python-Dev] Very Strange Argument Handling Behavior

2010-04-17 Thread Steven D'Aprano
local namespace). > > You can override __new__ of a type subclass to achieve the same > effect (or even directly call type.__new__ with strange dict as an > argument). I think that only works in Python 3.x, in 2.x the __dict__ is always a regul

Re: [Python-Dev] Enhanced tracker privileges for dangerjim to do triage.

2010-04-26 Thread Steven D'Aprano
ersonality of the contributor? Not everyone appreciates being examined like that, even in an informal ad-hoc way, and while they might suck it up and accept it, they don't necessarily benefit from it. I reckon that for every one or two would-be contributors who value having that early oversigh

Re: [Python-Dev] Enhanced tracker privileges for dangerjim to do triage.

2010-04-26 Thread Steven D'Aprano
On Tue, 27 Apr 2010 03:45:39 am Antoine Pitrou wrote: > Steven D'Aprano pearwood.info> writes: > > Who are we worried about offending? The crowds on the Internet who > > never volunteer for anything, who never submit patches, let alone > > offer to do the unglamourous

Re: [Python-Dev] Enhanced tracker privileges for dangerjim to do triage.

2010-04-26 Thread Steven D'Aprano
On Tue, 27 Apr 2010 05:37:31 am Antoine Pitrou wrote: > Steven D'Aprano pearwood.info> writes: > > That depends on what you call unglamourous work. No, I don't triage > > bugs. I don't have commit privileges, so I can't. > > Is this the sole reaso

Re: [Python-Dev] Enhanced tracker privileges for dange rjim to do triage.

2010-04-27 Thread Steven D'Aprano
I'm aware of, nor do I understand what you mean by "most fundamental sense" of diverse. Talking about diversity within a single community is not an oxymoron. > As long as Pythonicity is important to Python, there is > danger as well as opportunity in more rapid influx of

Re: [Python-Dev] Enhanced tracker privileges for dange rjim to do triage.

2010-04-28 Thread Steven D'Aprano
On Wed, 28 Apr 2010 06:16:48 pm Stephen J. Turnbull wrote: > Steven D'Aprano writes: > > As I see it, the two camps are divided purely on the question of > > how to get increased privileges. > > As I see it, the division is over what constitutes merit, and how i

Re: [Python-Dev] Possible patch for functools partial - Interested?

2010-05-07 Thread Steven D'Aprano
ed to avoid duplicated jobs. I think it is reasonable to expect that partial(operator.add, 2) compares equal to partial(operator.add, 2). I don't think he's suggesting it should compare equal to partial(lambda x,y: x+y, 2). +0.5 on comparing equal. +1 on a nicer repr for partial objects.

Re: [Python-Dev] Possible patch for functools partial - Interested?

2010-05-07 Thread Steven D'Aprano
On Sat, 8 May 2010 03:57:06 am Steve Holden wrote: > Steven D'Aprano wrote: > > On Sat, 8 May 2010 02:07:55 am Rob Cliffe wrote: > >> Sorry to grouse, but isn't this maybe being a bit too clever? > >> Using your example, > >> p1 = partial(operato

Re: [Python-Dev] Possible patch for functools partial - Interested?

2010-05-12 Thread Steven D'Aprano
guments that compare equal. That's a nice, conservative change that is unlikely to lead to bugs, unlike some of the more "clever" proposals that rely on mathematical equivalences that don't hold for Python objects. -- Steven D'Aprano

Re: [Python-Dev] Possible patch for functools partial - Interested?

2010-05-13 Thread Steven D'Aprano
;from functools import partial; p = partial(lambda x: x)').repeat()) 1.2715129852294922 No need to make that worse if that can be avoided. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Unordered tuples/lists

2010-05-18 Thread Steven D'Aprano
3.3, since I think 3.2 and 2.7 are in feature-freeze). I suggest you also take this idea to python-l...@python.org or comp.lang.python first, to see whether there is any enthusiasm from the wider Python community. -- Steven D'Aprano ___ Python-

Re: [Python-Dev] Unordered tuples/lists

2010-05-20 Thread Steven D'Aprano
r ordered list except for the purposes of equality comparisons). I don't believe it is a burden on developers to add it to their own application should they need it. -1 for this. If anyone wishes to support this proposal, please come up with

Re: [Python-Dev] Reasons behind misleading TypeError message when passing the wrong number of arguments to a method

2010-05-20 Thread Steven D'Aprano
takes exactly 2 positional arguments (1 given) This is misleading, since C().method is a bound method which takes one argument, x, not two. I find myself wishing that Python distinguished between ArgumentError and other TypeErrors, so that the method wrapper of bound methods could simply catch ArgumentError and subtract 1 from each argument count. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-26 Thread Steven D'Aprano
is a Python implementation of a stable Java API, Brian has said the futures package has been on PyPI for about a year, and it's been flagged as a production/stable release since October last year. http://pypi.python.org/pypi/futures3 Given that there does seem to be a general a

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-26 Thread Steven D'Aprano
ough not quickly. For instance, we move threading into the concurrent namespace, and leave behind in its place a stub: from concurrent.threading import * Then for (say) 3.3 the stub could gain a PendingDeprecation warning, then in 3.4 a Deprecation warning, and finally in 3.5 or 3.6 it could be r

Re: [Python-Dev] PEP 3148 ready for pronouncement

2010-05-28 Thread Steven D'Aprano
far more likely to confuse users than adding it to its own namespace. Compare: import __future__ import futures with: import __future__ import concurrency.futures In my opinion, it is high time for the std lib to pay more attention to the final Zen: Namespaces are one honking great idea --

Re: [Python-Dev] Python Library Support in 3.x (Was: email package status in 3.X)

2010-06-18 Thread Steven D'Aprano
On Fri, 18 Jun 2010 11:19:37 pm Jesse Noller wrote: > Awesome. I plan on wasting as much money on the useless effort of > moving python 3 forward as humanly possible. I'm sorry, but if that's sarcasm, it's far too subtle for me :(

Re: [Python-Dev] email package status in 3.X

2010-06-19 Thread Steven D'Aprano
had my experience would have been different. It's bad enough to have to tell people "Python 3 is currently lacking some critical libraries, particularly third-party libraries" without also telling them (wrongly IMO) "oh, and it's a new language too". --

Re: [Python-Dev] email package status in 3.X

2010-06-19 Thread Steven D'Aprano
fully moved to Python3 with the Jonestown cult mass-suicide doesn't really strike me as a sign that you want to join them. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-

Re: [Python-Dev] email package status in 3.X

2010-06-20 Thread Steven D'Aprano
ning non-ASCII characters ("those funny letters"), insist that the problem is the user for giving non-ASCII characters. Even when they're in the user's native (non-Latin) language. Even when the OS supports them. Gah. -- Steven D'Aprano

Re: [Python-Dev] email package status in 3.X

2010-06-21 Thread Steven D'Aprano
prove itself before being made a part of the standard library, let alone a built-in. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org

Re: [Python-Dev] email package status in 3.X

2010-06-21 Thread Steven D'Aprano
f not, how do they deal with this issue? [...] > This is still smelling an awful lot like the 2.x str type to me Yes. Virtually the only difference I can see is that it lets the user set a per-object default encoding to use when coercing strings to and from bytes. If this is not the case, ca

[Python-Dev] [OT] glyphs [was Re: email package status in 3.X]

2010-06-22 Thread Steven D'Aprano
;, which looks more like a modern 'f'. An unfortunate example, as the old English long-s gets its own Unicode codepoint. http://en.wikipedia.org/wiki/Long_s -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http:/

Re: [Python-Dev] WPython 1.1 was released

2010-06-23 Thread Steven D'Aprano
short paragraph description of what it is? Actually, since I'm none of the above, I'll answer my own question: WPython is an implementation of Python that uses 16-bit wordcodes instead of byte code, and claims to have various performance benefits from doing so. It looks like good work, thank y

[Python-Dev] Can Python implementations reject semantically invalid expressions?

2010-07-01 Thread Steven D'Aprano
.g. if the keyhole optimizer raised SyntaxError (or some other exception) on seeing this: def f(): return 1 + "1" instead of compiling something which can't fail to raise an exception, would that still be a legal Python implementati

Re: [Python-Dev] Can Python implementations reject semantically invalid expressions?

2010-07-02 Thread Steven D'Aprano
at? When I try it in Python 3.1, I get: TypeError: don't know how to disassemble str objects How do you get that result? -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Can Python implementations reject semantically invalid expressions?

2010-07-02 Thread Steven D'Aprano
or environmental variable, like -O, and documented as potentially changing the behaviour of the program. But given how few accidental errors are likely to be caught by this, I doubt it would be of any real benefit. Thanks to all who answered! -- Steven D'Aprano ___

Re: [Python-Dev] Can Python implementations reject semantically invalid expressions?

2010-07-02 Thread Steven D'Aprano
specific exception messages is living in a state of sin and shouldn't complain when their code stops working. An implementation might choose to raise TypeError('is this the right place for an argument?') on alternate Tuesdays, and it would still meet the promises made by the language

Re: [Python-Dev] Licensing // PSF // Motion of non-confidence

2010-07-06 Thread Steven D'Aprano
on't have a hope in hell of surviving a legal challenge, including one that would have meant that I was agreeing to never work for any person or company in Australia who ever had with a telephone. -- Steven D'Aprano ___ Python-Dev mailing

Re: [Python-Dev] Can ftp url start with file:// ?

2010-07-08 Thread Steven D'Aprano
If I go ahead with this assumption and fix a bug in stdlib, I am > introducing a regression because at the moment the above is > considered a ftp url. Do you have a url for the bug report? -- Steven D'Aprano ___ Python-Dev mailing list Pyt

Re: [Python-Dev] Can ftp url start with file:// ?

2010-07-11 Thread Steven D'Aprano
ht behaviour is to raise an exception and let the caller deal with it, or provide a means to register an alternative. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubsc

Re: [Python-Dev] New regex module for 3.2?

2010-07-11 Thread Steven D'Aprano
gh... the old regex engine and the new re engine were side-by-side for many years before regex was deprecated and finally removed in 2.5. Hypothetically, re2 could similarly be added to the standard library while re is deprecated. -- Steven D'Aprano

Re: [Python-Dev] avoiding accidental shadowing of top-level libraries by the main module

2010-07-12 Thread Steven D'Aprano
tting the search continue > further down sys.path (although I agree the current semantics of > getting two copies of the same module under different names in this > case are less than ideal). Yes, that's a weird corner case. I don't see any advantage to keeping that behaviour. --

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-14 Thread Steven D'Aprano
tes it: import difflib difflib.disable_heuristic = True On 2.7.0 and older versions, creating the flag won't do anything useful, but nor will it cause an exception. It will be harmless. I think an explicit flag is better than relying on magic behaviour triggered by "unlikely"

Re: [Python-Dev] A suggestion

2010-07-17 Thread Steven D'Aprano
scussion. If you're still interested in it, please take it to comp.lang.python or tu...@python.org. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Steven D'Aprano
efer it's easy enough to wrap it in a function in your own module. Not everything needs to be a built-in. I'm -0 on adding an argument to os.makedirs, +0 on adding a variant function to os, and +0.5 on adding the variant to the shutil module. -- Steven D'Aprano __

Re: [Python-Dev] Python-dev signal-to-noise processing question

2010-07-22 Thread Steven D'Aprano
python are > likely to be happy to learn it." We don't need to make excuses for why we don't give the answer here. It's enough to give the reason -- it's off-topic for this list, which is about the development of Python. That and a poin

Re: [Python-Dev] Python-dev signal-to-noise processing question

2010-07-22 Thread Steven D'Aprano
On Fri, 23 Jul 2010 10:59:32 am Ben Finney wrote: > Steven D'Aprano writes: > > We don't need to make excuses for why we don't give the answer > > here. It's enough to give the reason -- it's off-topic for this > > list, which is about the develo

Re: [Python-Dev] http://bugs.python.org/issue231540

2010-07-23 Thread Steven D'Aprano
ably go right over his head (as they went over mine). -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] http://bugs.python.org/issue231540

2010-07-23 Thread Steven D'Aprano
pid idiot volunteers" is a good way to motivate more people to provide patches. But either way, I think you answer your own question: apparently some people *are* understanding of the reasons that issues sometimes get missed or neglected. -- Steven D'Aprano _

Re: [Python-Dev] Thoughts fresh after EuroPython

2010-07-24 Thread Steven D'Aprano
f") it becomes a hindrance instead, then Guido should make an exception. I promise that I won't cease taking his pronouncements seriously if he does :) -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyth

Re: [Python-Dev] Thoughts fresh after EuroPython

2010-07-26 Thread Steven D'Aprano
obscurity. It seems to me that he's merely suggesting that we are discreet about discussing vulnerabilities unless we have a plan to fix them. Whether such discretion is useful is an open question. It may be that the cat is already out of the bag an

Re: [Python-Dev] marking os.system() as deprecated in the docs

2010-07-26 Thread Steven D'Aprano
ss without caring what the output is. But perhaps os.system() should become an alias for subprocess.system() in 3.2, then deprecated in 3.3 and removed (from os only) in 3.4? -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Readability of hex strings (Was: Use of coding cookie in 3.x stdlib)

2010-07-26 Thread Steven D'Aprano
n the form " ..." to and from byte strings, I don't see the need for new syntax and would vote -1 on the idea. However, I'd vote +0 on a matching bytes.tohex() method to partner with the existing bytes.fromhex(). -- Steven D'Aprano ___

Re: [Python-Dev] Is it intentional that "sys.__debug__ = 1" is illegal in Python 2.7?

2010-07-30 Thread Steven D'Aprano
of "approved" methods. Is that the intention? I have always understood that if you create your own __*__ names, you risk clashing with a special method, but otherwise it is allowed, if disapproved off. I would not like to see it become forbidden. -- Steven D'Aprano ___

Re: [Python-Dev] No response to posts

2010-08-02 Thread Steven D'Aprano
What's the average age of those 1 in 5 issues? Maybe 1 in 5 is exactly right, given the realities of people available to respond to issues versus people available to report issues. Maybe 1 in 5 is supernaturally good, given our resources available. -- Steven D'Aprano ___

Re: [Python-Dev] Proposed tweaks to functools.wraps

2010-08-11 Thread Steven D'Aprano
ay) g, and g wraps h, then you have: func.__wrapped__ => f func.__wrapped__.__wrapped__ => g func.__wrapped__.__wrapped__.__wrapped__ => h and so on, until you reach a function that doesn't wrap anything and doesn't have a __wrapped__ attribute. I'm +1 on the proposal.

Re: [Python-Dev] Fixing #7175: a standard location for Python config files

2010-08-12 Thread Steven D'Aprano
7;t we learned from Firefox? I for one am getting heartily sick and tired of having to "fix" (that is, throw away) corrupted Firefox databases. Please don't go down that path. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@py

Re: [Python-Dev] 'hasattr' is broken by design

2010-08-23 Thread Steven D'Aprano
t does, it has little or no utility for me. In the future, I'll just write a try...except block and catch errors if the attribute doesn't exist. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] 'hasattr' is broken by design

2010-08-24 Thread Steven D'Aprano
On Tue, 24 Aug 2010 11:09:10 am Guido van Rossum wrote: > On Mon, Aug 23, 2010 at 4:56 PM, Steven D'Aprano wrote: [...] > > I have always thought that hasattr() does what it says on the box: > > it tests for the *existence* of an attribute, that is, one that > > sta

Re: [Python-Dev] Rework nntlib?

2010-09-15 Thread Steven D'Aprano
could have three users between them, or they could be critical infrastructure for a quarter of the Internet. I'm not trying to belittle the stats you have gathered, but without the context of *what* the numbers represent, it's impossible t

Re: [Python-Dev] Polymorphic best practices [was: (Not) delaying the 3.2 release]

2010-09-16 Thread Steven D'Aprano
he wire-format is this formalized encoding we have to use to be able > to send it from place to place.  In that mental model it seems to > make perfect sense to have a StringMessage that I have encode to > transmit, and a BytesMessage that I receive and have to decode to > wo

Re: [Python-Dev] Goodbye

2010-09-22 Thread Steven D'Aprano
d to annoy and upset a number of people in a remarkably short time too. The long term health of Python depends more on the community than the existence of a few bugs more or less. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@

Re: [Python-Dev] Moving the developer docs?

2010-09-23 Thread Steven D'Aprano
elopers to make changes to the source code, why not trust them to make changes to the documentation? The real problem, it seems to me, is the difficulty in getting developers to write and update documentation, not in preventing them from writing it. -- Steven D'Aprano ___

Re: [Python-Dev] Moving the developer docs?

2010-09-23 Thread Steven D'Aprano
dium and Scholarpedia are notable examples that attempt to increase the (real or perceived) reliability and accountability of their articles by prohibiting anonymous edits altogether. Despite the influence of Wikipedia, "wiki" does not mean "open to everyone to

Re: [Python-Dev] Python wiki

2010-09-23 Thread Steven D'Aprano
ght be something like "This page is locked. You must log in to edit this page." or similar. How does one get an account? Can I edit anonymously? Once I found a page I could edit, it was relatively straightforward. So that's a plus :) -- Steven D'Aprano

Re: [Python-Dev] os.path.normcase rationale?

2010-09-24 Thread Steven D'Aprano
en an arbitrary file system, there's no obvious way to determine what it will do to file names short of trying to create a file and see what happens. -- Steven D'Aprano ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.

Re: [Python-Dev] Resource leaks warnings

2010-09-29 Thread Steven D'Aprano
tion? E.g. something like: gc.enable_file_warnings() run_my_tests_for_leakage() gc.disable_file_warnings() or similar. (I'm not wedded to it being in the gc module.) Otherwise, I'm +0.25 on enabling it with a command line switch, and -0 on turning it o

Re: [Python-Dev] os.path.normcase rationale?

2010-10-05 Thread Steven D'Aprano
On Tue, 5 Oct 2010 07:21:15 pm Chris Withers wrote: > On 25/09/2010 04:25, Steven D'Aprano wrote: > > 1. Return the case of a filename in some canonical form which > > depends on the file system? > > 2. Return the case of a filename as it is actually stored on disk?

<    7   8   9   10   11   12   13   14   15   16   >