Re: [Python-Dev] devguide: Point out that OS X users need to change examples to use python.exe instead of

2011-01-10 Thread Glyph Lefkowitz
On Jan 10, 2011, at 1:37 PM, Łukasz Langa wrote: > I'm using the case-sensitive variant of HFS+ since 10.4. It works, I like it > and you get ./python with it. I realize that this isn't a popularity contest for this feature, but I feel like I should pipe up here and mention that it breaks some

Re: [Python-Dev] Import and unicode: part two

2011-01-19 Thread Glyph Lefkowitz
On Jan 20, 2011, at 12:02 AM, Glenn Linderman wrote: > But for local code, having to think up an ASCII name for a module rather than > use the obvious native-language name, is just brain-burden when creating the > code. Is it really? You already had to type 'import', presumably if you can thi

Re: [Python-Dev] Import and unicode: part two

2011-01-19 Thread Glyph Lefkowitz
On Jan 20, 2011, at 12:19 AM, Glenn Linderman wrote: > Now if the stuff after m_ was the hex UTF-8 of "café", that could get > interesting :) (As it happens, it's the hex digest of the MD5 of the UTF-8 of café... ;-))___ Python-Dev mailing list Pytho

Re: [Python-Dev] Import and unicode: part two

2011-01-20 Thread Glyph Lefkowitz
On Jan 20, 2011, at 11:46 AM, Guido van Rossum wrote: > On Thu, Jan 20, 2011 at 5:16 AM, Nick Coghlan wrote: >> On Thu, Jan 20, 2011 at 10:08 PM, Simon Cross >> wrote: >>> I'm changing my vote on this to a +1 for two reasons: >>> >>> * Initially I thought this wasn't supported by Python at all

Re: [Python-Dev] Support the /usr/bin/python2 symlink upstream

2011-03-04 Thread Glyph Lefkowitz
On Fri, Mar 4, 2011 at 10:03 AM, Westley Martínez wrote: > On Fri, 2011-03-04 at 00:54 -0800, Aaron DeVore wrote: > > On Thu, Mar 3, 2011 at 11:44 PM, Kerrick Staley > wrote: > > > That way, if the sysadmin does decide to replace the installed "python" > file, he can do so without inadvertently d

Re: [Python-Dev] funky buildbot

2011-03-10 Thread Glyph Lefkowitz
On Mar 10, 2011, at 3:18 PM, Bill Janssen wrote: > It's a new Mac Mini running the latest Snow Leopard, with Python 2.6.1 > (the /usr/bin/python) and buildslave 0.8.3, using Twisted 8.2.0. I realize that Python 2.6 is pretty old too, but a _lot_ of bugfixes have gone into Twisted since 8.2. I'm

Re: [Python-Dev] Finally switch urllib.parse to RFC3986 semantics?

2011-03-18 Thread Glyph Lefkowitz
On Mar 18, 2011, at 8:41 PM, Guido van Rossum wrote: > Really. Do they still call them URIs? :-) Well, by RFC 398*7* they're calling them IRIs instead. 'irilib', perhaps? ;-) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/ma

Re: [Python-Dev] Embedded Python startup is slow

2011-03-24 Thread Glyph Lefkowitz
On Mar 24, 2011, at 4:06 AM, bruce bushby wrote: > I have previously asked this question in python-list, however I think it > belongs here. As the saying goes, this list is for development of python, not with python. So it would be appropriate to make a suggestion as to some direction for Pyt

Re: [Python-Dev] Differences among Emacsen

2011-03-30 Thread Glyph Lefkowitz
On Mar 30, 2011, at 2:54 PM, Barry Warsaw wrote: > On Mar 30, 2011, at 09:43 AM, Ralf Schmitt wrote: > >> Barry Warsaw writes: >>> >>> In case you missed it, there are now *three* Python modes. Tim Peters' >>> original and best (in my completely unbiased opinion ) python-mode.el >>> which is

Re: [Python-Dev] Policy for making changes to the AST

2011-04-04 Thread Glyph Lefkowitz
On Apr 4, 2011, at 2:00 PM, Guido van Rossum wrote: > On Mon, Apr 4, 2011 at 10:05 AM, fwierzbi...@gmail.com > wrote: >> As a re-implementor of ast.py that tries to be node for node >> compatible, I'm fine with #1 but would really like to have tests that >> will fail in test_ast.py to alert me!

Re: [Python-Dev] Supporting Visual Studio 2010

2011-04-05 Thread Glyph Lefkowitz
On Apr 5, 2011, at 8:52 AM, exar...@twistedmatrix.com wrote: > On 09:58 am, mar...@v.loewis.de wrote: >>> Won't that still be an issue despite the stable ABI? Extensions on >>> Windows should be linked to the same version of MSVCRT used to compile >>> Python >> >> Not if they use the stable ABI.

Re: [Python-Dev] python and super

2011-04-14 Thread Glyph Lefkowitz
On Apr 14, 2011, at 12:59 PM, Ronald Oussoren wrote: > What would the semantics be of a super that (...) I think it's long past time that this move to python-ideas, if you don't mind. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python

Re: [Python-Dev] the role of assert in the standard library ?

2011-04-28 Thread Glyph Lefkowitz
On Apr 28, 2011, at 12:59 PM, Guido van Rossum wrote: > On Thu, Apr 28, 2011 at 12:54 AM, Tarek Ziadé wrote: >> In my opinion assert should be avoided completely anywhere else than >> in the tests. If this is a wrong statement, please let me know why :) > > I would turn that around. The assert

Re: [Python-Dev] Linus on garbage collection

2011-05-06 Thread Glyph Lefkowitz
On May 6, 2011, at 12:31 PM, Michael Foord wrote: > pypy and .NET choose to arbitrarily break cycles rather than leave objects > unfinalised and memory unreclaimed. Not sure what Java does. I think that's a mischaracterization of their respective collectors; "arbitrarily break cycles" implies t

Re: [Python-Dev] Linus on garbage collection

2011-05-06 Thread Glyph Lefkowitz
Apologies in advance for contributing to an obviously and increasingly off-topic thread, but this kind of FUD about GC is a pet peeve of mine. On May 6, 2011, at 10:04 AM, Neal Becker wrote: > http://gcc.gnu.org/ml/gcc/2002-08/msg00552.html Counterpoint: . Sorr

Re: [Python-Dev] Python 3.x and bytes

2011-05-19 Thread Glyph Lefkowitz
On May 19, 2011, at 1:43 PM, Guido van Rossum wrote: > -1; the result is not a *character* but an integer. Well, really the result ought to be an octet, but I suppose adding an 'octet' type is beyond the scope of even this sprawling discussion :). > I'm personally favoring using b'a'[0] and po

Re: [Python-Dev] The socket HOWTO

2011-06-05 Thread Glyph Lefkowitz
On Jun 4, 2011, at 11:32 PM, Martin v. Löwis wrote: > b) telling people to use Twisted or asyncore on the server side > if they are new to sockets is bad advice. People *first* have > to understand sockets, and *then* can use these libraries > and frameworks. Those libraries aren't made to b

Re: [Python-Dev] The socket HOWTO

2011-06-07 Thread Glyph Lefkowitz
On Jun 5, 2011, at 3:35 PM, Martin v. Löwis wrote: > And that's all fine. I still claim that you have to *understand* > sockets in order to use it properly. By this, I mean stuff like > "what is a TCP connection? how is it established?", "how is UDP > different from TCP?", "when data arrives, what

Re: [Python-Dev] Comments of the PEP 3151

2011-07-26 Thread Glyph Lefkowitz
On Jul 26, 2011, at 6:49 PM, Antoine Pitrou wrote: > On Mon, 25 Jul 2011 15:28:47 +1000 > Nick Coghlan wrote: >> There may be some error codes that we choose to map to these generic >> errors, even if we don't give them their own exception types at this >> point (e.g. ECONSHUTDOWN could map dire

Re: [Python-Dev] HTMLParser and HTML5

2011-07-29 Thread Glyph Lefkowitz
On Jul 29, 2011, at 7:46 AM, Stefan Behnel wrote: > Joao S. O. Bueno, 29.07.2011 13:22: >> On Fri, Jul 29, 2011 at 1:37 AM, Stefan Behnel wrote: >>> Brett Cannon, 28.07.2011 23:49: On Thu, Jul 28, 2011 at 11:25, Matt wrote: > > - What policies are in place for keeping parity w

Re: [Python-Dev] HTMLParser and HTML5

2011-07-29 Thread Glyph Lefkowitz
On Jul 29, 2011, at 3:00 PM, Matt wrote: > I don't see any real reason to drop a decent piece of code (HTMLParser, that > is) in favor of a third party library when only relatively minor updates are > needed to bring it up to speed with the latest spec. I am not really one to throw stones here,

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-11 Thread Glyph Lefkowitz
On Aug 11, 2011, at 11:39 AM, Barry Warsaw wrote: > On Aug 11, 2011, at 04:39 PM, Éric Araujo wrote: > >>> * XXX what is the __file__ of a "pure virtual" package? ``None``? >>> Some arbitrary string? The path of the first directory with a >>> trailing separator? No matter what we put, *some*

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-12 Thread Glyph Lefkowitz
On Aug 12, 2011, at 11:24 AM, P.J. Eby wrote: > That is, the above code hardocdes a variety of assumptions about the import > system that haven't been true since Python 2.3. Thanks for this feedback. I honestly did not realize how old and creaky this code had gotten. It was originally develo

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-12 Thread Glyph Lefkowitz
On Aug 12, 2011, at 2:33 PM, P.J. Eby wrote: > At 01:09 PM 8/12/2011 -0400, Glyph Lefkowitz wrote: >> Upon further reflection, PEP 402 _will_ make dealing with namespace packages >> from this code considerably easier: we won't need to do AST analysis to look >> f

Re: [Python-Dev] Ctypes and the stdlib (was Re: LZMA compression support in 3.3)

2011-08-28 Thread Glyph Lefkowitz
On Aug 28, 2011, at 7:27 PM, Guido van Rossum wrote: > In general, an existing library cannot be called > without access to its .h files -- there are probably struct and > constant definitions, platform-specific #ifdefs and #defines, and > other things in there that affect the linker-level callin

Re: [Python-Dev] Python 3 optimizations continued...

2011-09-01 Thread Glyph Lefkowitz
On Sep 1, 2011, at 5:23 AM, Cesare Di Mauro wrote: > A simple solution: when tracing is enabled, the new instruction format will > never be executed (and information tracking disabled as well). Correct me if I'm wrong: doesn't this mean that no profiler will accurately be able to measure the p

Re: [Python-Dev] Maintenance burden of str.swapcase

2011-09-07 Thread Glyph Lefkowitz
On Sep 7, 2011, at 10:26 AM, Stephen J. Turnbull wrote: > How about "title"? >>> 'content-length'.title() 'Content-Length' You might say that the protocol "has" to be case-insensitive so this is a silly frill: there are definitely enough case-sensitive crappy bits of network middleware out the

Re: [Python-Dev] Maintenance burden of str.swapcase

2011-09-11 Thread Glyph Lefkowitz
On Sep 11, 2011, at 11:49 AM, Michael Foord wrote: > Does anyone *actually* use .title() for this? (And why not just use the > correct casing in the string literal...) Yes. Twisted does, in various MIME-ish places (IMAP, SIP), although not in HTTP from what I can see. I imagine other similar

Re: [Python-Dev] Fixing the XML batteries

2011-12-10 Thread Glyph Lefkowitz
On Dec 10, 2011, at 2:38 AM, Stefan Behnel wrote: > Note, however, that html5lib is likely way too big to add it to the stdlib, > and that BeautifulSoup lacks a parser for non-conforming HTML in Python 3, > which would be the target release series for better HTML support. So, > whatever library

Re: [Python-Dev] Fixing the XML batteries

2011-12-10 Thread Glyph Lefkowitz
On Dec 10, 2011, at 6:30 PM, Terry Reedy wrote: > A little data: the HTML5lib project lives at > https://code.google.com/p/html5lib/ > It has 4 owners and 22 other committers. > > The most recent release, html5lib 0.90 for Python, is nearly 2 years old. > Since there is a separate Python3 repos

Re: [Python-Dev] Packaging and setuptools compatibility

2012-01-24 Thread Glyph Lefkowitz
On Jan 24, 2012, at 12:54 PM, Alexis Métaireau wrote: > I'm wondering if we should support that (a way to have plugins) in the new > packaging thing, or not. If not, this mean we should come with another > solution to support this outside of packaging (may be in distribute). If yes, > then we s

Re: [Python-Dev] Python 3 optimizations, continued, continued again...

2012-02-01 Thread Glyph Lefkowitz
On Feb 1, 2012, at 12:46 PM, Guido van Rossum wrote: > I understand that you're hesitant to just dump your current mess, and > you want to clean it up before you show it to us. That's fine. (...) And > remember, it doesn't need to be > perfect (in fact perfectionism is probably a bad idea here).

Re: [Python-Dev] sharing sockets among processes on windows

2012-03-14 Thread Glyph Lefkowitz
On Mar 13, 2012, at 5:27 PM, Kristján Valur Jónsson wrote: > Hi, > I´m interested in contributing a patch to duplicate sockets between processes > on windows. > Tha api to do this is WSADuplicateSocket/WSASocket(), as already used by > dup() in the _socketmodule.c > Here´s what I have: Just in

Re: [Python-Dev] Playing with a new theme for the docs

2012-03-22 Thread Glyph Lefkowitz
On Mar 21, 2012, at 6:28 PM, Greg Ewing wrote: > Ned Batchelder wrote: >> Any of the tweaks people are suggesting could be applied individually using >> this technique. We could just as easily choose to make the site >> left-justified, and let the full-justification fans use custom stylesheets

Re: [Python-Dev] Issue 13524: subprocess on Windows

2012-03-22 Thread Glyph Lefkowitz
On Mar 21, 2012, at 4:38 PM, Brad Allen wrote: > I tripped over this one trying to make one of our Python at work > Windows compatible. We had no idea that a magic 'SystemRoot' > environment variable would be required, and it was causing issues for > pyzmq. > > It might be nice to reflect the fin

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

2012-04-02 Thread Glyph Lefkowitz
On Apr 2, 2012, at 10:39 AM, Kristján Valur Jónsson wrote: > "no steps" is something unquantifiable. All time has steps in it. "No steps" means something very specific when referring to time APIs. As I recently explained here: . -gly

Re: [Python-Dev] this is why we shouldn't call it a "monotonic clock" (was: PEP 418 is too divisive and confusing and should be postponed)

2012-04-05 Thread Glyph Lefkowitz
On Apr 5, 2012, at 8:07 PM, Zooko Wilcox-O'Hearn wrote: > On Thu, Apr 5, 2012 at 7:14 PM, Greg Ewing > wrote: >> >> This is the strict mathematical meaning of the word "monotonic", but the way >> it's used in relation to OS clocks, it seems to mean rather more than that. > > Yep. As far as I

Re: [Python-Dev] PEP 418 is too divisive and confusing and should be postponed

2012-04-07 Thread Glyph Lefkowitz
On Apr 7, 2012, at 3:40 AM, Steven D'Aprano wrote: > In any case, NTP is not the only thing that adjusts the clock, e.g. the > operating system will adjust the time for daylight savings. Daylight savings time is not a clock adjustment, at least not in the sense this thread has mostly been talki

Re: [Python-Dev] 2.4 news reaches interesting places

2004-12-09 Thread Glyph Lefkowitz
On Wed, 2004-12-08 at 17:39 -0500, Phillip J. Eby wrote: > The only thing that will fix the PR issue is to have a Python compiler > distributed as part of the language. It doesn't matter if it doesn't > support the full generality of Python, or even if it doesn't speed many > operations up muc

Re: [Python-Dev] 2.4 news reaches interesting places

2004-12-09 Thread Glyph Lefkowitz
On Thu, 2004-12-09 at 16:37 -0500, Phillip J. Eby wrote: > +1 on all the stuff you said, with one minor exception. Pyrex-the-language > is often unpythonically ugly and verbose at present. Personally I have no problem with Pyrex's current tradeoffs, but given the amount of effort that this is g

Re: [Python-Dev] Let's get rid of unbound methods

2005-01-05 Thread Glyph Lefkowitz
On Tue, 2005-01-04 at 22:12 -0500, Bob Ippolito wrote: > If you have a class hierarchy where this is a problem, it's probably > pretty fragile to begin with, and you should think about making it > simpler. I agree with James's rant almost entirely, but I like super() anyway. I think it is an in

Re: [Python-Dev] Let's get rid of unbound methods

2005-01-05 Thread Glyph Lefkowitz
On Wed, 2005-01-05 at 12:11 +0100, Alex Martelli wrote: > Hmmm, seems to me we'd need copies of the function object for this > purpose: For the stated use-case of serialization, only one copy would be necessary, and besides - even *I* don't use idioms as weird as the one you are suggesting very

Re: [Python-Dev] PEP 246: lossless and stateless

2005-01-14 Thread Glyph Lefkowitz
On Fri, 2005-01-14 at 10:07 -0500, Phillip J. Eby wrote: > Maybe I'm missing something, but for those interfaces, isn't it okay to > keep the state in the *adapted* object here? In other words, if PointPen > just added some private attributes to store the extra data? I have been following thi

Re: [Python-Dev] PEP 246: lossless and stateless

2005-01-14 Thread Glyph Lefkowitz
On Fri, 2005-01-14 at 19:14 -0500, Bob Ippolito wrote: > I think the idea is that it's "better" to have an adapter from > IBusinessThunk -> IGtkUIPlugFactory, which you can use to *create* a > stateful object that complies with the IGtkUIPlug interface. > > This way, you are explicitly creating

Re: [Python-Dev] PEP 246: let's reset

2005-01-16 Thread Glyph Lefkowitz
On Sun, 2005-01-16 at 13:00 -0500, Phillip J. Eby wrote: > """One type is the "extender", ... > By contrast, an "independent adapter" ... I really like the way this part of the PEP is sounding, since it really captures two almost, but not quite, completely different use-cases, the confusion betw

Re: [Python-Dev] Getting rid of unbound methods: patch available

2005-01-16 Thread Glyph Lefkowitz
On Sun, 2005-01-16 at 22:12 -0800, Guido van Rossum wrote: > What do people think? (My main motivation for this, as stated before, > is that it adds complexity without much benefit.) > *** > *** 331,339 > def test_im_class(): > class C: > def foo(self): pass > -

Re: [Python-Dev] Getting rid of unbound methods: patch available

2005-01-17 Thread Glyph Lefkowitz
On Mon, 2005-01-17 at 07:43 -0800, Guido van Rossum wrote: > Note that you can't pickle unbound methods anyway unless you write > specific suppport code to do that; it's not supported by pickle > itself. It's supported by Twisted. Alternatively, replace "pickle" with "python object serializer of

Re: [Python-Dev] Getting rid of unbound methods: patch available

2005-01-17 Thread Glyph Lefkowitz
On Mon, 2005-01-17 at 23:58 +0100, M.-A. Lemburg wrote: > If you want to make methods look more like functions, > the method object should become a subclass of the function > object (function + added im_* attributes). I think this suggestion would fix my serialization problem as well... but does

RE: Moving towards Python 3.0 (was Re: [Python-Dev] Speed up functioncalls)

2005-01-31 Thread Glyph Lefkowitz
On Mon, 2005-01-31 at 08:51 -0800, Michael Chermside wrote: > However, remember that changing away from reference counting is a change > to the semantics of CPython. Right now, people can (and often do) assume > that objects which don't participate in a reference loop are collected > as soon as th

Re: [Python-Dev] rationale for the no-new-features approach

2005-03-09 Thread Glyph Lefkowitz
Guido van Rossum wrote: On Wed, 09 Mar 2005 10:38:12 -0500, Jim Fulton <[EMAIL PROTECTED]> wrote: +1 (wish * could say +sys.maxint). Anthony gets my +1 too, which then adds up to sys.maxint. :-) +1! I hope this mailing list runs on python2.2+, or the discussion has to stop now due to OverflowErro

Re: [Python-Dev] rationale for the no-new-features approach

2005-03-10 Thread Glyph Lefkowitz
Bob Ippolito wrote: try: set except NameError: from sets import Set as set Syntactical variations notwithstanding, I think it's a common desire to want to run on at least the last few versions of Python, but take advantage of improvements and not emit deprecation warnings on the latest a

Re: [Python-Dev] anonymous blocks

2005-04-19 Thread Glyph Lefkowitz
Guido van Rossum wrote: But what exactly are you trying to accomplish here? I think that putting the defs *before* the call (and giving the anonymous blocks temporary local names) actually makes the code clearer: I'm afraid that 'block1', 'block2', and 'doFoo' aren't really making anything clear f

<    1   2