Re: [Python-Dev] Remove str.find in 3.0?

2005-08-28 Thread Steve Holden
s surely that one of find()'s legitimate return values evaluates false in a Boolean context. It's especially troubling that the value that does so doesn't indicate search failure. I'd prefer to live with the wart until 3.0 introduces something more satisfactory, or simply r

Re: [Python-Dev] empty string api for files

2005-08-28 Thread Steve Holden
> I have no idea of today's practice though. > Indeed. Something like: SYSIN DD *,BLKSIZE=80 IIRC (which I may well not do after thirty years or so). People used to solve generic programming problems in JCL just for the hell of it. regards Steve -- Steve Holden +44 150

Re: [Python-Dev] Remove str.find in 3.0?

2005-08-30 Thread Steve Holden
g can it? > > (Just think of it as rpartition() stopping at the last occurrence, > rather than searching from the right. :-) > So we can check that a substring x appears precisely once in the string s using s.partition(x) == s.rpartition(x) Oops, it fails

Re: [Python-Dev] Proof of the pudding: str.partition()

2005-08-31 Thread Steve Holden
f >>the variations anybody has proposed, including the ones I just showed above. > > > try again. > The collective brainpower that's been exercised on this one enhancement already must be phenomenal, but the proposal still isn't perfect. regards Steve -- Steve Hold

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-01 Thread Steve Holden
keyword there's nothing to stop us calling the convenience function "print". With the removal of the trailing-comma functionality we'd only have to add parentheses to 2.X print statements to have them work :-) Next question: could the function have a sensible

Re: [Python-Dev] String views

2005-09-01 Thread Steve Holden
n to pass a substring to such > a routine. > Since Python strings *can* contain embedded NULs, doesn't that rather poo on the idea of passing pointers to their data to C functions as things stand? regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-02 Thread Steve Holden
, and be driven to suicide by the enforced interactions with the other developers who had nothing but scorn for the lowly print statement. On the other hand, with that kind of money you could probably hire enough geeks to do the maintenance for you. first-in-line-for-the-job-ly y'rs

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-03 Thread Steve Holden
ent from ABC and BASIC"? In that case I suppose we'd better start thinking about what to use instead of "if" and "for". What did the print statement do to us that it must be cast out in this way? I suspect the fundamental problem is that the commas do something mor

Re: [Python-Dev] String views

2005-09-05 Thread Steve Holden
pragmatic Python solution, so I'm not about to start a war about it. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ ___ Python-Dev mailing list Python-Dev@python.org http:

Re: [Python-Dev] reference counting in Py3K

2005-09-06 Thread Steve Holden
the need > for ref. counting. > Reference counting is an implementation detail, and isn't a part of the language specifications. I have no idea why you find it so annoying, but there are other implementations (Jython, Iron Python) that don't use it. regards Steve -- Steve Ho

Re: [Python-Dev] Replacement for print in Python 3.0

2005-09-06 Thread Steve Holden
> I would anticipate security issues with allowing general expressions: you are effectively allowing access to eval(). If a naiive programmer were to use unverified input as a format string unpleasant things could happen ... your call, but it seems dangerous to me. Remember C's printf has

Re: [Python-Dev] PEP 350: Codetags

2005-09-28 Thread Steve Holden
ent line. > # > # Whitespace formatting, after all, is VERY PYTHONIC. ;-) > # Delimiters on the other hand -- well, we prefer not to mention > # the sort of languages that use those, right? ;-) > +1 > Another possibility is to recognize lines like: > > #--- > #*** > #=

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-29 Thread Steve Holden
rllib2.py: type = 'I' if file else 'D' > xdrlib.py: print 'succeed' if pred(x) else 'failed', ':', x > xmlrpclib.py: write("1" if value else "0") > Having though about it more clo

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-29 Thread Steve Holden
Guido van Rossum wrote: > On 9/29/05, Steve Holden <[EMAIL PROTECTED]> wrote: > >>I would argue for mandatory parentheses around the expression, leaving >>room later (probably after Guido is no longer around to be sick at the >>site of it) for: >> >>de

Re: [Python-Dev] Adding a conditional expression in Py3.0

2005-09-29 Thread Steve Holden
ow you've pushed me over the edge. I've made up my mind now, "X if C > else Y" it will be. I hope to find time to implement it in Python 2.5. > Let it be as controversial as bool or @decorator, I don't care. > Not before time, either. If this en

Re: [Python-Dev] Conditional Expression Resolution

2005-09-30 Thread Steve Holden
lp siding with the underdog, doomed for the knacker's yard in Python 3.0. Sniff. The decision on X if C else Y is a cause for much jubilation. Congratulations, Guido! nothing-to-see-here-folks-let's-move-along-ly y'rs - steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Hol

Re: [Python-Dev] __doc__ behavior in class definitions

2005-10-07 Thread Steve Holden
for function scopes, as the module crud = "module crud" def f(): print crud crud = "function crud" print crud f() does indeed raise an UnboundLocalError exception. I'm not enough of a language lawyer to determine exactly why this

Re: [Python-Dev] Pythonic concurrency

2005-10-11 Thread Steve Holden
ad communications are problematic, and arbitrary access to foreign-thread state is a nightmare (although the position has been somewhat alleviated by the introduction of threading.local). Beyond the single-producer many-consumers model there is still plenty of room to shoot yourself in the foot.

Re: [Python-Dev] Extending tuple unpacking

2005-10-11 Thread Steve Holden
> > Indeed. It's a (minor) pain that optional flag variables and variable length > argument lists are currently mutually exclusive. Although, if you had that > rule, I'd want to be able to write: > >def f(a, b, *, foo=1, bar=2): pass > > to get a function which r

Re: [Python-Dev] Extending tuple unpacking

2005-10-13 Thread Steve Holden
; > Py> data = dict(a=1, b=2, c=3) > Py> (a, b, c) = **data > Py> print a, b, c > (1, 2, 3) > > Cheers, > Nick. > This gets too weird, though. What about: (a, **d) = **data Should this be equivalent to a = 1 d = dict(b=2, c=3) ? Basically I suspect we are

Re: [Python-Dev] Guido v. Python, Round 1

2005-10-17 Thread Steve Holden
Neal Norwitz wrote: > We all know Guido likes Python. But the real question is do pythons like > Guido? > > http://python.org/neal/ > Neal: Getting a 404 on this one right now. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119

Re: [Python-Dev] Guido v. Python, Round 1

2005-10-17 Thread Steve Holden
rg" and "~neal". > This appears to be a DNS issue: the stuff is on creosote, 213.84.134.214, not www or dinsdale. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.co

Re: [Python-Dev] Divorcing str and unicode (no more implicit conversions).

2005-10-31 Thread Steve Holden
t would thereby be engendered I think that would be a good idea. We can fix their programs by making Unicode the default string type, but it will take much longer to fix their thinking. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Ho

Re: [Python-Dev] PEP 351, the freeze protocol

2005-10-31 Thread Steve Holden
deserve to have their > software not work. > That sounds like a "get out of jail free" card for Microsoft and many other software vendors ... regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC

Re: [Python-Dev] Adding examples to PEP 263

2005-11-04 Thread Steve Holden
content. > Under NO circumstances should a Wiki page be used as the destination for a link in a runtime error message. If the page happens to be spammed when the user follows the link they'll wonder why the error message is pointing to a page full of links to hot babes, or whatever.

Re: [Python-Dev] s/hotshot/lsprof

2005-11-20 Thread Steve Holden
le helpfully told me: > > Center for Alcohol & Drug Treatment > I suspect you may already know that Fredrik referred to Cascade of Attention-Deficit Teenagers Where's the BDFL to say "yes" or "no" when you need one? regards Steve -- Steve Holden

Re: [Python-Dev] ast status, memory leaks, etc

2005-11-20 Thread Steve Holden
akes a lot more than that when running without > pymalloc. > Is there maybe a machine in the SourceForge compile farm that could be used for this work? regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX

Re: [Python-Dev] ElementTree - Why not part of the core? (fwd)

2005-12-08 Thread Steve Holden
contribute. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/ ___ Python-Dev mailing list Python-Dev@python.org http://mai

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-10 Thread Steve Holden
;Error". > > > Unless, of course, your exception is not an error (like the > aforementioned HTTPRedirect). ;) > For library modules I'd recommend that the exception hierarchy be rooted at either BaseError (for modules not designed from import-*) or ModulenameBaseError (for

Re: [Python-Dev] Deprecate __ private (was Re: PEP 8 updates/clarifications)

2005-12-12 Thread Steve Holden
vate fantasy ;-) It works fine for its intended use. In that case it would seem to make even *more* sense, theoretically, to replace the class name in mangled names with a GUID, hence avoiding collisions in similarly-named subclasses. Then it would work even finer (though the mangled names would b

Re: [Python-Dev] ElementTree - Why not part of the core? (fwd)

2005-12-12 Thread Steve Holden
> > anyone ? > How about "independent" to highlight the fact that development takes place elsewhere? Or "external"? regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006

Re: [Python-Dev] ElementTree - Why not part of the core? (fwd)

2005-12-12 Thread Steve Holden
d I think we need a name that differentiates externally-maintained packages from the contributions that are integrated into the core and maintained as part of it. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006

Re: [Python-Dev] ElementTree in stdlib

2005-12-13 Thread Steve Holden
at all for one's code to be included in the core. If the authors of code aren't bothered about its promotion to the core I hardly think anyone else should be. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyC

Re: [Python-Dev] Sharing expat instances

2005-12-14 Thread Steve Holden
to just a single entry in the global module index and adding a first-level TOC at the beginning of that section of content? Even if we then have to call it the global package and module index! regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC

Re: [Python-Dev] Website cruft

2005-12-14 Thread Steve Holden
r be used as we have now migrated to CVS on Sourceforge :-( Could someone fix that? regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/ ___

Re: [Python-Dev] Website cruft

2005-12-14 Thread Steve Holden
Fred L. Drake, Jr. wrote: > On Wednesday 14 December 2005 10:12, Steve Holden wrote: > > However, this change highlights the fact that the checkins mailing-list > > description at > > > >http://mail.python.org/mailman/listinfo/python-checkins > > > &

Re: [Python-Dev] Sharing expat instances

2005-12-14 Thread Steve Holden
ations will be released containing different versions of the same extension module. In that case each app would want the version that came with it anyway, no? There are slightly different requirements for packaged distribution than for the standard interpreter, which I assume can always rely o

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-15 Thread Steve Holden
addition of the 'text' module] Seems to me your solution is obvious: import text as somethingelse regartds Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/

Re: [Python-Dev] fixing log messages

2005-12-19 Thread Steve Holden
Fredrik Lundh wrote: > just noticed an embarrasing misspelling in one of my recent checkins, only That's "embarrassing", by the way. You're obviously having a bad spelling day :-) not-throwing-stones-ly y'rs - steve -- Steve Holden +44 150 684 7255 +1

Re: [Python-Dev] Expose Subversion revision number to Python

2005-12-19 Thread Steve Holden
y convey anything useful. > I thought it was more succinct than the build-date when rebuilding continuously during testing, but I guess I'm only -0 on dropping it. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.co

Re: [Python-Dev] fixing log messages

2005-12-20 Thread Steve Holden
Fredrik Lundh wrote: > Steve Holden wrote: > > >>That's "embarrassing", by the way. You're obviously having a bad >>spelling day :-) > > > I'd say that any spelling with more than 500,000 google hits is perfectly > valid... >

Re: [Python-Dev] fixing log messages

2005-12-20 Thread Steve Holden
Fredrik Lundh wrote: > Steve Holden wrote: > > >>>I'd say that any spelling with more than 500,000 google hits is perfectly >>>valid... >>> >> >>Anything you say, Frederick ... >> >>thirteen-million-google-hits-can't-possibl

Re: [Python-Dev] status of development documentation

2005-12-21 Thread Steve Holden
Fredrik Lundh wrote: > > - is it perhaps time to start investigating using "lighter" tools for the core > documentation ? > +1 regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holde

Re: [Python-Dev] status of development documentation

2005-12-21 Thread Steve Holden
e with that style, but for some reason the oft-repeated advice that plain text markup is an acceptable format for documentation contributions doesn't seem to have escaped the gravity field. So that's just as good for the existing docs as anything that replaces them (if anything does). regard

Re: [Python-Dev] status of development documentation

2005-12-22 Thread Steve Holden
complain than to contribute. Maybe we should fix > that problem... > I very much agree that we should, and *not* by making it more difficult to complain ;-) Could the PSF help here by offering annual prizes for the best contributions to the documentation, or wouldn't that be an a

Re: [Python-Dev] timeout options in high-level networking modules

2005-12-22 Thread Steve Holden
al socket.defaulttimout() or somehow monkey-patch the modules you want to use, and neither of those options are entirely satisfactory. Basically any method that can create a new TCP connection should acquire an optional timeout=None parameter, right? regards Steve -- Steve

Re: [Python-Dev] status of development documentation

2005-12-24 Thread Steve Holden
ly run Python installed from packaged installers. Alternatively, is there any mileage in trying to either get Sourceforge to provide Windows machines in the compile farm, or get Microsoft to provide more software fee to Windows testers? regards Steve -- Steve Holden +44 150 684 7255 +1 8

Re: [Python-Dev] status of development documentation

2005-12-24 Thread Steve Holden
Steve Holden wrote: [...] > Alternatively, is there any mileage in trying to either get Sourceforge > to provide Windows machines in the compile farm, or get Microsoft to > provide more software fee to Windows testers? ^fee^free^ -- Steve Holden +44 150 684 7255 +1 800 494 31

Re: [Python-Dev] status of development documentation

2005-12-24 Thread Steve Holden
if Microsoft has or will create a compile farm? > I'll see what I can do ... regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/ __

Re: [Python-Dev] status of development documentation

2005-12-26 Thread Steve Holden
Steve Holden wrote: > [EMAIL PROTECTED] wrote: > >>Steve> Alternatively, is there any mileage in trying to either get >>Steve> Sourceforge to provide Windows machines in the compile farm, or >>Steve> get Microsoft to provide more software fee to Windo

Re: [Python-Dev] a quit that actually quits

2005-12-28 Thread Steve Holden
typing a > name shows its repr()). > > In the mean time I'm a strong believer in "it ain't broke so don't fix it" > here. > +1, with the proviso that we might add a description of how to exit to the interactive rubric (if anyone can

Re: [Python-Dev] Ph.D. dissertation ideas?

2006-01-12 Thread Steve Holden
gage a neophyte with an specific teaching strategy (possibly based on personality analysis) and then present problems to verify comprehension and offer appropriate feedback. That would be a terrific game! regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC

Re: [Python-Dev] TAR problems under Solaris

2006-01-13 Thread Steve Holden
group made good money selling an "extended" version of tar (that coped with longer paths than the standard version) to customers who could afford it. Guess they never fed the changes back into the trunk ... regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119

Re: [Python-Dev] Names matter.

2006-01-16 Thread Steve Holden
inly, > it should not be acceptable to contribute to Python under a false name. > In principle I think you are correct. In practice it's difficult to see how to nsure this without insistence on some digital certificate from an acceptable CA - by which I mean one that actually chec

Re: [Python-Dev] timeit module

2006-01-16 Thread Steve Holden
of the Zen > of Python. > Presumably for benchmarking purposes the function call overhead would be present for all compaered techniques. Do you mean rules #0 and #2? > [...] regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC

Re: [Python-Dev] Names matter.

2006-01-16 Thread Steve Holden
me, *really*. > Sorry. My previous message suffered from a smiley-deficiency. Clearly there is little point in a signed piece of paper saying "I am me, signed 'me'". regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden W

Re: [Python-Dev] str with base

2006-01-18 Thread Steve Holden
he normal str and repr coercions via %s and %r >>respectively. > > > Is the byte type intended to be involved in string formatters at all? > Does byte("%i") % 3 have the obvious effect, or is it an error? > > Although upon further consideration I don&

Re: [Python-Dev] str with base

2006-01-18 Thread Steve Holden
x27;t even be interested in seeing 1.3407807929942597e+154 written in fixed point form *in decimal*, let alone in binary where the representation, though unambiguous, would have over 500 bits, most of them zeros. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Ho

Re: [Python-Dev] str with base

2006-01-18 Thread Steve Holden
Steve Holden wrote: [...] > Personally I wouldn't even be interested in seeing > 1.3407807929942597e+154 written in fixed point form *in decimal*, let > alone in binary where the representation, though unambiguous, would have > over 500 bits, most of them zeros. > Well, sho

Re: [Python-Dev] Python icon

2006-01-18 Thread Steve Holden
priate enlightenment was eventually attained through Google: > http://mail.python.org/pipermail/python-list/2006-January/319862.html > That's probably not a bad idea. We should also add script explaining how to download the beta site data and the generation software so people can

Re: [Python-Dev] str with base

2006-01-18 Thread Steve Holden
the chops to use the struct model to get his point across. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/ ___ Python-De

Re: [Python-Dev] str with base

2006-01-19 Thread Steve Holden
hould we allow a "digits" argument, or just the radix argument? > Another possibility, since Python 3 can break backward compatibility: we could take a page out of Icon's book and use an "rN" suffix for non-decimal literals. 23 == 27r8 == 17r16 regards Steve -- Ste

Re: [Python-Dev] Path inherits from string

2006-01-26 Thread Steve Holden
one defined, otherwise reverting to current behaviour? That way we could just just define an __open__(self) method for path objects. I doubt performance is a huge issue here. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenw

[Python-Dev] SourceForge Download Page, Subversion Home Page

2006-01-27 Thread Steve Holden
several of these kinds of discussions. I'll try to only spill on to the python-dev list what impinges on developers. Your opinions on these specific issues are probably the most significant. [pydotorgers: let's try not to spam python-dev with any discussions

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-07 Thread Steve Holden
ut, how do I give the dispatcher control again to process the next asynchronous network event? The usual answer is "process the request in a thread". That way the dispatcher can spring to life for each event as quickly as needed. regards Steve -- Steve Holden +

Re: [Python-Dev] threadsafe patch for asynchat

2006-02-08 Thread Steve Holden
Josiah Carlson wrote: > "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > >>Steve Holden wrote: >> >> >>>>What is the reason that people want to use threads when they can have >>>>poll/select-style message processing? Why does Zope requir

Re: [Python-Dev] Let's just *keep* lambda

2006-02-08 Thread Steve Holden
nly if a > community consensus emerges from the thousands of random variants? > Right, then we can get back to important stuff like how to represent octal constants. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.

Re: [Python-Dev] Let's just *keep* lambda

2006-02-09 Thread Steve Holden
f actually *giving up* once you know it's time. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/ ___ Python-Dev mai

Re: [Python-Dev] Pervasive socket failures on Windows

2006-02-12 Thread Steve Holden
agree with the solution. > > I was away from mail, ahem, "working". > yeah, right, at your off-site boondoggle south of the border. we know. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC

<    3   4   5   6   7   8