Re: [Python-Dev] Retrieve an arbitrary element from a set without removing it

2009-10-25 Thread Scott David Daniels
[x for x in res][0] x, = res # I didn't think of this one before recently Are all answers, but none of them I would consider *obvious*. And from my SQL-hacking experience: x = min(s) --Scott David Daniels scott.dani...@acm.org ___ Pyt

Re: [Python-Dev] random number generator state

2009-08-16 Thread Scott David Daniels
Raymond Hettinger wrote: [Scott David Daniels] I find I have a need in randomized testing for a shorter version of getstate, even if it _is_ slower to restore. [blah about big state] Sounds like you could easily wrap the generator to get this. It would slow you down but would give the

[Python-Dev] random number generator state

2009-08-15 Thread Scott David Daniels
ython community? --Scott David Daniels scott.dani...@acm.org ___ 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] Current patch process question

2009-07-08 Thread Scott David Daniels
der myself done until comments come back on the patch. --Scott David Daniels scott.dani...@acm.org ___ 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] Current patch process question

2009-07-08 Thread Scott David Daniels
ere some page I overlooked? Is there a better forum in which to ask this question? --Scott David Daniels scott.dani...@acm.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.pyt

Re: [Python-Dev] PEP 376

2009-07-02 Thread Scott David Daniels
ber correctly, the default csv dialect is just the Excel dialect, so this would be two different ways of saying the same things. Right, but Guido's point is, decide which one is the is the definition and stick to talking about it in that form. --Scott David Daniels scott.dani...

Re: [Python-Dev] PEP 376

2009-06-30 Thread Scott David Daniels
Kevin Teague wrote: On Jun 30, 2009, at 4:46 PM, Tarek Ziadé wrote: On Tue, Jun 30, 2009 at 10:06 PM, Scott David Daniels wrote: Tarek Ziadé wrote: On Tue, Jun 30, 2009 at 8:37 PM, Paul Moore wrote: [1] I'd actually like it if the PEP defined an uninstall command - something like "

Re: [Python-Dev] PEP 376

2009-06-30 Thread Scott David Daniels
works: $ python setup.py uninstall some_package Then explicitly say so for us poor schlubs. --Scott David Daniels scott.dani...@acm.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] [Python-checkins] r73569 - peps/trunk/pep-0101.txt

2009-06-26 Thread Scott David Daniels
only one of the four I checked; I suspect the other three are similarly mislabeled. --Scott David Daniels scott.dani...@acm.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] io.BufferedReader.peek() Behaviour in python3.1

2009-06-16 Thread Scott David Daniels
I tend to prefer zero-ish defaults, how about: def peek(self, size=None, nonblocking=False) We still don't have "at most one read" code, but something a bit like data = obj.peek(size=desired, nonblocking=True) if len(data) < desired: data = obj.peek(size

Re: [Python-Dev] ctime: I don't think that word means what you think it means.

2009-06-14 Thread Scott David Daniels
st_creation_time Speaking as somebody who thought the c in ctime meant creation, I'm +1 on this proposal with Greg's modification. --Scott David Daniels scott.dani...@acm.org ___ Python-Dev mailing list Python-Dev@python.org http:

Re: [Python-Dev] Two proposed changes to float formatting

2009-04-26 Thread Scott David Daniels
ark Dickinson wrote: > On Sun, Apr 26, 2009 at 10:42 PM, Scott David Daniels wrote: >... >> I had also said (without explaining: >>>> only the trailing zeroes with the e, so we wind up with: >>>> 11579208923731619542357098500868

Re: [Python-Dev] Two proposed changes to float formatting

2009-04-26 Thread Scott David Daniels
Mark Dickinson wrote: > On Sun, Apr 26, 2009 at 8:11 PM, Scott David Daniels > wrote: >> As a user of Idle, I would not like to see the change you seek of >> having %f stay full-precision. When a number gets too long to print >> on a single line, the wrap depends on

Re: [Python-Dev] Two proposed changes to float formatting

2009-04-26 Thread Scott David Daniels
massive number of zeroes, how about we replace only the trailing zeroes with the e, so we wind up with: 1157920892373161954235709850086879078532699846656405640e+23 or 115792089237316195423570985008687907853269984665640564.0e+24 or some such, rather than 1.157920892373162e+77 or 1.

Re: [Python-Dev] Python-Dev Digest, Vol 69, Issue 143

2009-04-17 Thread Scott David Daniels
e, it's non-associative, which is a much rarer and more surprising thing. We do at least have ('1' + '2') + '3' == '1' + ('2' + '3') But we don't have: (1e40 + -1e40) + 1 == 1e40 + (-1e40 + 1) Non-associativity is

Re: [Python-Dev] Evaluated cmake as an autoconf replacement

2009-04-07 Thread Scott David Daniels
s, and tools to strip whitespace off the end of lines as information-destroying. --Scott David Daniels scott.dani...@acm.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.pyt

Re: [Python-Dev] GPython?

2009-03-27 Thread Scott David Daniels
Nick Coghlan wrote: Collin Winter wrote: That would be a bikeshed discussion of such magnitude, you'd have to invent new colors to paint the thing. Octarine. Definitely octarine :) I'm not so sure of the color itself, but its name should definitely rhyme with "orange.&

Re: [Python-Dev] Non-Core project: IDLE

2009-03-23 Thread Scott David Daniels
g for). In any case, even a charter of "unit tests to 50% coverage" of Idle would be a huge improvement. I've run after specific bugs in Idle, but don't really know the lay of the land. --Scott David Daniels scott.dani...@acm.org __

Re: [Python-Dev] Ext4 data loss

2009-03-11 Thread Scott David Daniels
table for a single file should probably push back out to a full sync. This would be trickier to accomplish if the using code had to suss out how to get to the fp. Clearly I have plans for a ZipFile expansion, but this could only conceivably hit 2.7, and 2.8 / 3.2 is a lot more likely. --Scott

Re: [Python-Dev] PEP 372 -- Adding an ordered directory to collections ready for pronouncement

2009-03-03 Thread Scott David Daniels
ike getfirst() would be worth while here? But you must decide if what you want really does LRU -- does accessing the oldest entry make it the most recent entry? --Scott David Daniels scott.dani...@acm.org ___ Python-Dev mailing list Python

Re: [Python-Dev] Attention Bazaar mirror users

2009-02-25 Thread Scott David Daniels
zaar/ In particular: What do I need? * Bazaar 1.0 or newer. As of this writing (04-Nov-2008) Bazaar 1.8 is the most recent release. As Bazaar is written in Python (yay!), it is available for all major platforms, See the Bazaar home page for information about versions for your pl

Re: [Python-Dev] The interpreter accepts f(**{'5':'foo'}); is this intentional?

2009-02-05 Thread Scott David Daniels
Christian Heimes wrote: ... The performance penalty is slime to nothing for the common case Sorry, I love this typo. -Scott ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http:

Re: [Python-Dev] Partial function application 'from the right'

2009-01-30 Thread Scott David Daniels
It is computationally hard to do that (may have to chase chains of **kwarg-passing functions), but even hard to document. So, I'd avoid it. --Scott David Daniels scott.dani...@acm.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.py

Re: [Python-Dev] Partial function application 'from the right'

2009-01-29 Thread Scott David Daniels
d be an the Ellipsis instance. --Scott David Daniels scott.dani...@acm.org ___ 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] Python 3.0.1 (io-in-c)

2009-01-27 Thread Scott David Daniels
10.873 1.28 12.31 ** Text overwrite ** 20K modify one unit at a time 0.296 0.0721.320 4.09 18.26 400K modify 20 units at a time 5.690 1.360 22.500 4.18 16.54 400K modify 4096 units at a time 151.000 88.300 509.000 1.71 5.76 --Scott David

Re: [Python-Dev] A wart which should have been repaired in 3.0?

2008-12-30 Thread Scott David Daniels
ath.dirname(os.path.commonprefix([ os.path.normpath(p) for p in paths])) give '/a', not '/a/b'. --Scott David Daniels scott.dani...@acm.org ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyth

Re: [Python-Dev] A wart which should have been repaired in 3.0?

2008-12-29 Thread Scott David Daniels
he keyword arg "delimited," rather than "delimiter." On Windows, I'd like to see: os.path.commonprefix(['a/b/c.d/e'f', r'a\b\c.d\eve'], delimited=True) return either 'a/b/c.d' or r'a\b\c.d' Perhaps even ['a', 'b&#

Re: [Python-Dev] extremely slow exit for program having huge (45G) dict (python 2.5.2)

2008-12-20 Thread Scott David Daniels
held[number_to_hold] ... --Scott David Daniels scott.dani...@acm.org ___ 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] Redirecting warnings.showwarning to logging

2008-11-22 Thread Scott David Daniels
Scott David Daniels wrote: > > Match the new warning protocol exactly: > def showwarning(message, category, filename, lineno, > file=None, line=None): > ... > If the line is not None, use it (which will happen if you pass it >

Re: [Python-Dev] Redirecting warnings.showwarning to logging

2008-11-22 Thread Scott David Daniels
gs.formatwarning and warnings.showwarning. If you get it wrong, a deprecation warning can prevent a module like md5 from loading (for example). --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

[Python-Dev] Possible issue in warnings.py

2008-09-21 Thread Scott David Daniels
ems to accidentally escalating warnings into errors, and it looked to me like this would accidentally swallow errors getting warning context and make them fail silently. The Idle issue that I'm fiddling with is that it doesn't take the new showwarning call format, and it looked like this shou

Re: [Python-Dev] Weak Dictionary Iteration Behavior in Python 3

2008-09-13 Thread Scott David Daniels
urely i = list(d) is a more reasonable way to do this. I seldom find a reason to use .keys --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] PEP: Frequently-requested additional features for the `unittest` module

2008-08-13 Thread Scott David Daniels
t, I implemented my own versions of these asserts (Le, Lt, ...) a year or so ago, and still find them so useful that I'll re-implement them where- ever I am working without similar tests available. --Scott David Daniels [EMAIL PROTECTED] ___ Pyth

Re: [Python-Dev] PEP: Frequently-requested additional features for the `unittest` module

2008-07-16 Thread Scott David Daniels
Ben Finney wrote: Scott David Daniels <[EMAIL PROTECTED]> writes:> I would rather something more like: def assert_compare_true(op, first, second, msg=None): if op(first, second): return raise self.failure_exception(msg) if ms

Re: [Python-Dev] PEP: Frequently-requested additional features for the `unittest` module

2008-07-16 Thread Scott David Daniels
% vars()) self.failure_exception("%(first)r %(op)r %(second): %(msg)" % vars()) --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyth

[Python-Dev] Update bz2 library?

2008-07-13 Thread Scott David Daniels
I just noticed that the bz2lib version was updated to 1.0.5 in December of 2007, for security reasons. I suspect it would be good to be sure to ship this with 2.6 or 3.0. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-02 Thread Scott David Daniels
Scott David Daniels [EMAIL PROTECTED] ___ 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] py3k: print function treats sep=None and end=None in an unintuitive way

2008-04-08 Thread Scott David Daniels
Alessandro Guido wrote: > Nick Coghlan wrote: > Eric Smith wrote: >> Because None means 'use the default value'. You probably want: >> print('a', 'b', sep='', end='') > > I think this is a "not optimally designed" API > because you have to read the documentation to understand why Excuse me, I do

Re: [Python-Dev] Rational approximation methods

2008-01-19 Thread Scott David Daniels
Jeffrey Yasskin wrote: > The second returns the simplest rational within some distance. For > instance, it'll prefer 22/7 over 333/106 if both are close enough. We > might call it .simplest_within() for now. This seems useful for > converting from float and displaying results to users, where we pre

Re: [Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages

2008-01-10 Thread Scott David Daniels
deos (former My Videos) > yay, next up posix support I suspect that the whole thing was done to make sure that developers of applications could: A: cope with stupidly long path names. V: cope with spaces in path names. I bet they never intended to keep the huge names, just t

Re: [Python-Dev] Do we need both Trac and Roundup?

2008-01-06 Thread Scott David Daniels
re in the logging in process, there should be an indication of how much your box must be opened up before you can "log on," at least in the screen you get to when you log on. However, each time I went to enter such a note, I needed to "log on." I just

Re: [Python-Dev] Contributing to Python

2008-01-06 Thread Scott David Daniels
quot;perfect" patch costs me more like > between half an hour and an hour. > QOTW. I think this excerpt should show up in the new developer area. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@p

Re: [Python-Dev] splitext('.cshrc')

2007-03-08 Thread Scott David Daniels
as incorrect, and have work-arounds. As these files now show > up with "no extension", I rather expect that the work-around > won't trigger, and the default behavior will be the correct one. c) Given a filename, make an appropriately named associated file. pyo_name =

Re: [Python-Dev] Caching float(0.0)

2006-10-03 Thread Scott David Daniels
fval) { ... if (fval == 0.0 && raw_match(&fval, cached)) { PY_INCREF(cached); return cached; } ... -- -- Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mai

Re: [Python-Dev] Tix not included in 2.5 for Windows

2006-09-30 Thread Scott David Daniels
Bob Ippolito wrote: > On 9/30/06, Scott David Daniels <[EMAIL PROTECTED]> wrote: >> Christos Georgiou wrote: >>> Does anyone know why this happens? I can't find any information pointing to >>> this being deliberate. >> Also note: the Os/X univ

Re: [Python-Dev] Tix not included in 2.5 for Windows

2006-09-30 Thread Scott David Daniels
ote: the Os/X universal seems to include a Tix runtime for the non-Intel processor, but not for the Intel processor. This makes me think there is a build problem. -- Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing

Re: [Python-Dev] Signals, threads, blocking C functions

2006-09-05 Thread Scott David Daniels
>> Ah. Well, I can assure you that it's not the oldest trick in the book, >> and not everyone uses it. > ... > Can't this just be enabled for platforms where it's known to work and let > Python as it currently is for the users of these legacy systems ? Ah, but that

Re: [Python-Dev] xturtle.py a replacement for turtle.py(!?)

2006-06-29 Thread Scott David Daniels
> >> Maybe 'turtleplus' or something? > > When it goes into Python, it will be 'turtle'. > Perhaps in the meantime (if xturtle is not loved), you could go with "turtle_" as in "like the standard turtle, but my definition." -- -- Sco

Re: [Python-Dev] Joke: Rush Limbaugh (a joke in and of himself)

2006-06-29 Thread Scott David Daniels
Aahz wrote: > On Thu, Jun 29, 2006, Scott David Daniels wrote: >> . > I'm hoping this was a typo of an e-mail address for sending, because > this is not appropriate for python-dev. This absolutely was a matter of clicking the wrong spot. I completely agree it would be in

[Python-Dev] Joke: Rush Limbaugh (a joke in and of himself)

2006-06-29 Thread Scott David Daniels
Rush Limbaugh was detained and questioned for transporting a possible illegal Viagra prescription into the country. Well... a least we know his back is feeling better. -- Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] doc for new restricted execution design for Python

2006-06-27 Thread Scott David Daniels
the code based on old behavior (it might be nice only when the jailer is around). So, reading your restrictions is a capability I'd like to be able to control. -- Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python

Re: [Python-Dev] PyRange_New() alternative?

2006-06-24 Thread Scott David Daniels
Martin v. Löwis wrote: > Scott David Daniels wrote: >> ... if I remember the standard >> correctly, the following code shouldn't complain: >> >> PyObject_CallFunction((PyObject*) (void *) &PyRange_Type, >> "lll"

Re: [Python-Dev] PyRange_New() alternative?

2006-06-23 Thread Scott David Daniels
ot sure about your compiler, but if I remember the standard correctly, the following code shouldn't complain: PyObject_CallFunction((PyObject*) (void *) &PyRange_Type, "lll", start, start+len*step, step) -- Scott David Daniels [EMAIL PROTECTED]

Re: [Python-Dev] Should issubclass() be more like isinstance()?

2006-04-05 Thread Scott David Daniels
ame ancestors as CheeseShop, but is True simply because issubclass(SillyWalks, Sketch) is True. More a document issue than anything, but to be considered. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org htt

Re: [Python-Dev] tally (and other accumulators)

2006-04-05 Thread Scott David Daniels
ke groupby() for this sort of > thing, with the aforementioned caveats. Functional code seems a little > clearer to me, although I realize that preference is not held > universally. However, sorted requires ordering. Try seq = [1, 1j, -1, -1j] * 5 Alex's tally works, but yours does no

Re: [Python-Dev] Discussing the Great Library Reorganization

2006-03-29 Thread Scott David Daniels
ackage "py". Would 'std' do as well for the top level, or should we use "python" for the python-coded versions? -- -- Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.p

Re: [Python-Dev] Expose the array interface in Python 2.5?

2006-03-18 Thread Scott David Daniels
t; I certainly have use for implementations that can give better guarantees, and I'd like to be able to distinguish the two. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/li

Re: [Python-Dev] Coverity Open Source Defect Scan of Python

2006-03-13 Thread Scott David Daniels
stock profits, rather than a solid value proposition. Trying to satisfy the profit-lust of angels has redirected more than one company. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/l

Re: [Python-Dev] bytes.from_hex()

2006-03-01 Thread Scott David Daniels
Chermside, Michael wrote: > ... I will say that if there were no legacy I'd prefer the tounicode() > and tostring() (but shouldn't itbe 'tobytes()' instead?) names for Python 3.0. Wouldn't 'tobytes' and 'totext' be better for 3.0 where text == un

Re: [Python-Dev] math.areclose ...?

2006-02-08 Thread Scott David Daniels
difference <= max(abs(x), abs(y)) * relative_tol) I use <=, since "zero-tolerance" should pass equal values. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python

Re: [Python-Dev] math.areclose ...?

2006-02-05 Thread Scott David Daniels
ative_tolerance. As to the equation itself, wouldn't a symmetric version be somewhat better? def nearby(x, y, rel_tol=1.e-5, abs_tol=1.e-8): return abs(x - y) < abs_tol + rel_tol * (abs(x) + abs(y)) This avoids areclose(0, 1e-8) != areclose(1e-8, 0), for example. --Scott David

[Python-Dev] Path PEP -- a couple of typos.

2006-02-04 Thread Scott David Daniels
ext >lib_dir = "/lib" >libs = glob.glob(os.path.join(lib_dir, "*s.o")) >==> >lib_dir = Path("/lib") >libs = lib_dir.files("*.so") Probably that should be: ... libs = glob.g

Re: [Python-Dev] str with base

2006-01-19 Thread Scott David Daniels
erting to base-64 and other weird formats, as well as providing decimal conversion into some unicode number ranges outside the ASCII group. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/ma

Re: [Python-Dev] Checking in a broken test was: Re: [Python-checkins]r41940 - python/trunk/Lib/test/test_compiler.py

2006-01-14 Thread Scott David Daniels
Fred L. Drake, Jr. wrote: > Scott David Daniels wrote: > > Would "expect_fail", "expect_failure", "expected_fail", or > > "expected_failure", work for you? > > None of these use the same naming convention as the other unittest

Re: [Python-Dev] Checking in a broken test was: Re: [Python-checkins]r41940 - python/trunk/Lib/test/test_compiler.py

2006-01-13 Thread Scott David Daniels
Fredrik Lundh wrote: > Scott David Daniels wrote: >> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466288 > > my main nit is the name: the test isn't broken in itself, and doesn't need > to be fixed; it's just not expected to succeed at this time

Re: [Python-Dev] Checking in a broken test was: Re: [Python-checkins]r41940 - python/trunk/Lib/test/test_compiler.py

2006-01-13 Thread Scott David Daniels
rator function in unittest. Here is where the recipe is, for those who want to comment further: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466288 --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Checking in a broken test was: Re: [Python-checkins]r41940 - python/trunk/Lib/test/test_compiler.py

2006-01-08 Thread Scott David Daniels
ttest.TestCase.failureException: pass else: raise BrokenTest(test_method.__name__, reason) return replacement wrapper.todo = reason return wrapper So your use looks like: class SomeTests(unittest.TestCase

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

2005-12-29 Thread Scott David Daniels
"license" for more information. >>> Let's add another line that says >>> Type "quit()" to exit >>> ... Or, perhaps: class _Quitter(str): def __call__(self): raise SystemExit quit = _Quitter('The quit command. Typ

Re: [Python-Dev] Keep default comparisons - or add a second set?

2005-12-27 Thread Scott David Daniels
ing an explicit __lt__ > isn't much of an extra burden, and will make > the ordering much more useful for debugging > and output. Tell me: >>> a = [0] * 3 >>> b = [0] * 3 >>> a[0] = b >>> b[0] = a What order should a and b have? --Scott David

Re: [Python-Dev] Incorporation of zlib sources into Python subversion

2005-12-18 Thread Scott David Daniels
g zip formats that are starting to be created from other sources). Would it make sense to include bzip2 in here as well (if the zipfile changes go in)? --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.

Re: [Python-Dev] ElementTree in stdlib

2005-12-14 Thread Scott David Daniels
Michael Chermside wrote: > ... a meme will spread which says (and PLEASE don't quote this!) > "ElementTree has a great API, but it's just too slow for real work." +1 DNQOTW :-) (Do Not Quote Of The Week) --Scott Davi

Re: [Python-Dev] Sharing expat instances

2005-12-14 Thread Scott David Daniels
more than a single process. If the .egg strategy is followed, I expect that either the file shared is in a user(or even process)-specific location or there is a shared folder that is writable by many processes from which executable code can be run. The one solution reduces sharing, the othe

Re: [Python-Dev] Sharing expat instances

2005-12-14 Thread Scott David Daniels
Barry Warsaw wrote: > On Wed, 2005-12-14 at 09:56 -0800, Scott David Daniels wrote: >> One good reason for this is that the .pyd's or .so's cannot necessarily >> be used from zip files > When you say "cannot necessarily", are the situations where they can be

Re: [Python-Dev] Sharing expat instances

2005-12-14 Thread Scott David Daniels
can then easily go in a Python25.zip). My (admittedly weak) understanding of how packages work is that all parts of a package should lie off the same node of the PYTHONPATH. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@

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

2005-12-12 Thread Scott David Daniels
Jeremy Hylton wrote: > On 12/12/05, Scott David Daniels <[EMAIL PROTECTED]> wrote: >> Perhaps "The __ name convention is designed for 'mixins'; as a means of >> enforcing "private" it is both ineffective and annoying. For example, >> distutils.m

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

2005-12-12 Thread Scott David Daniels
ated feature > - Generate deprecation warnings when it is used? >(This might be too much.) Perhaps "The __ name convention is designed for 'mixins'; as a means of enforcing "private" it is both ineffective and annoying. For example, distutils.msvccompiler uses a

[Python-Dev] Behavoir question.

2005-11-15 Thread Scott David Daniels
Since I am fiddling with int/long conversions to/from string: Is the current behavior intentional (or mandatory?): v = int(' 5 ') works, but: v = int(' 5L ') f

Re: [Python-Dev] to_int -- oops, one step missing for use.

2005-11-12 Thread Scott David Daniels
t directory, cd to that dir, and run test_hi_powers.py. Let me know if the tests pass or fail. Thanks. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscr

[Python-Dev] to_int -- oops, one step missing for use.

2005-11-09 Thread Scott David Daniels
Well, wouldn't you know it. I get the code right and mess up the directions. Scott David Daniels wrote: > if you build this module, I'd suggest using > "from to_int import chomp" to get a function that works like int > (producing a long when needed and so on). We

Re: [Python-Dev] int(string) (was: DRAFT: python-dev Summary for 2005-09-01 through 2005-09-16)

2005-11-09 Thread Scott David Daniels
emselves: Installer: http://members.dsl-only.net/~daniels/dist/to_int-0.10.win32-py2.4.exe Just the 2.4 dll: http://members.dsl-only.net/~daniels/dist/to_int-0.10.win32.zip Sources: http://members.dsl-only.net/~daniels/dist/to_int-0.10.zip --Scott David Daniels [EMAIL PROTEC

Re: [Python-Dev] GIL, Python 3, and MP vs. UP

2005-09-19 Thread Scott David Daniels
Michael Hudson wrote: > How does a copying gc differ much from a non-copying non-refcounted gc > here? One important issue for C coded modules is that addresses may change when a GC is invoked, so no remembering addresses in your module; you must recalculate before each use. -- Scott

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

2005-08-27 Thread Scott David Daniels
s reading from compressed data sources unnecessarily inefficient. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/opti

Re: [Python-Dev] Bare except clauses in PEP 348

2005-08-25 Thread Scott David Daniels
may start generating something silly like divide-by-zero. Not the end of an App, but the end of a Phase. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubsc

Re: [Python-Dev] PEP 348 (exception reorg) revised again

2005-08-15 Thread Scott David Daniels
ass of KeyboardInterrupt or SystemExit. -- Scott David Daniels [EMAIL PROTECTED] ___ 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] zlib 1.2.3 is just out

2005-07-23 Thread Scott David Daniels
dynamic blocks with no distance codes * Fix crc check bug in gzread() after gzungetc() * Do not return an error when using gzread() on an empty file I'd guess this belongs in 2.5, with a possible retrofit for 2.4. --Scott David Daniels [EMAIL PROT

Re: [Python-Dev] Chaining try statements: eltry?

2005-07-08 Thread Scott David Daniels
.html --Scott David Daniels [EMAIL PROTECTED] ___ 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] Possible C API problem?

2005-06-27 Thread Scott David Daniels
Michael Hudson wrote: > Gary Robinson <[EMAIL PROTECTED]> writes: >>... bus error 100% of the time ...: We've boiled it down pretty far, and I've sent him off to the mac-python folks (looks gcc-compilerish to me, or maybe fallout from slight changes in C function call s

Re: [Python-Dev] Is PEP 237 final -- Unifying Long Integers and Integers

2005-06-17 Thread Scott David Daniels
to PEP > 3000 instead. Since PEP 313 has been rejected, the trailing L no longer introduces ambiguity in the representation of roman(40) vs. roman(10L). --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://

[Python-Dev] Re: marshal / unmarshal

2005-04-10 Thread Scott David Daniels
"not all marshalled float text read"); + return NULL; + } return PyFloat_FromDouble(dx); } -- Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org h

[Python-Dev] Re: marshal / unmarshal

2005-04-08 Thread Scott David Daniels
detect code if that is what is wanted. I just want to know what the consensus is on the "should." If we cause exceptions, should they be one encode or decode or both? If not, do we replicate all NaNs, Infs of both signs, Indeterminates? --Scott David Daniels [EMAIL PROTECTED] __

[Python-Dev] marshal / unmarshal

2005-04-08 Thread Scott David Daniels
#x27;f\x061.#INF') == 1.0 Should loads raise an exception? Somehow, I thing 1.0 is not the best possible representation for +Inf. -- Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.o

[Python-Dev] Re: python-dev Summary for 2005-03-16 through 2005-03-31 [draft]

2005-04-01 Thread Scott David Daniels
Brett C. wrote: ... I figured I would take up the idea. So hear ^^ here ^^ we go. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.p

[Python-Dev] Re: @decoration of classes

2005-03-28 Thread Scott David Daniels
he data structures with: converter('flour', 'bread')(BakingClass) _But_ (at least for the app I was fiddling with) decorating at the top of declaration helps show the purpose of the class. Have a look at: http://aspn.activesta

[Python-Dev] Re: docstring before function declaration

2005-03-21 Thread Scott David Daniels
a twenty-two page document with no real content. Really, the twenty two pages included an introduction, conclusion, table of contents, appendix, and index. It just didn't have anything but section headings. It was a thrilling triumph of form over function; a real Suahuab aesthetic, to coi

[Python-Dev] Re: OK, time to retire

2005-03-02 Thread Scott David Daniels
erhaps your final summary could be a personal view of PyCon for those of us unable to get there. If you make no more contribution to Python than you have so far, you will have done us a great service. Hip-hip-hooray-ly y'rs --Scott David Daniels

[Python-Dev] Re: string find(substring) vs. substring in string

2005-02-16 Thread Scott David Daniels
do about 300 probes once the table is set (the underscores below): not the xyznot the xyznot the xyz... not ther_ not the__ not ther_ not the__ not ther_ ... -- Scott David

[Python-Dev] Re: string find(substring) vs. substring in string

2005-02-16 Thread Scott David Daniels
one-time-only overhead you can afford to reduce the per-search-character cost. --Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.

[Python-Dev] Re: Recent IBM Patent releases

2005-01-13 Thread Scott David Daniels
Terry Reedy wrote: "Scott David Daniels" <[EMAIL PROTECTED]> I believe our current policy is that the author warrants that the code is his/her own work and not encumbered by any patent. Without a qualifier such as 'To the best of my knowledge', the latter is an impossibl

[Python-Dev] Re: Recent IBM Patent releases

2005-01-12 Thread Scott David Daniels
." I believe our current policy is that the author warrants that the code is his/her own work and not encumbered by any patent. -- Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailma

[Python-Dev] Recent IBM Patent releases

2005-01-12 Thread Scott David Daniels
tents.)" This means to me we can put these in Python's library, but it is definitely something to start deciding now. -- Scott David Daniels [EMAIL PROTECTED] ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/

  1   2   >