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
> 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
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
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
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
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
, 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
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
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:
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
>
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
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:
>
> #---
> #***
> #=
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
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
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
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
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
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.
>
> 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
;
> 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
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
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
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
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
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.
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
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
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
;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
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
>
> 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
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
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
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
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/
___
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
> >
> &
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
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/
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
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
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...
>
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
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
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
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
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
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
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
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/
__
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
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
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
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
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
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
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
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&
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
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
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
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
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
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
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
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 +
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
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.
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
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
701 - 769 of 769 matches
Mail list logo