Indeed, normative annex https://www.unicode.org/reports/tr31/tr31-35.html
section 5 says: "if the programming language has case-sensitive
identifiers, then Normalization Form C is appropriate" (vs NFKC for a
language with case-insensitive identifiers) so to follow the standard we
should have used
Next(s) would seem good...
Alex
Sent from my iPhone
On Oct 24, 2009, at 6:47 PM, John Arbash Meinel john.mei...@canonical.com
wrote:
Adam Olsen wrote:
On Fri, Oct 23, 2009 at 11:04, Vitor Bosshard algor...@gmail.com
wrote:
I see this as being useful for frozensets as well, where you
2009/8/7 Kristján Valur Jónsson krist...@ccpgames.com:
Unless I am very much mistaken, this is the approach Ruby takes.
Everything is an expression. For example, the value of a block is the value
of
The last expression in the block.
I've never understood the need to have a distinction
FWIW, I prefer Fredrik's wish too.
Alex
On Sat, May 2, 2009 at 12:26 PM, Fredrik Johansson
fredrik.johans...@gmail.com wrote:
On Sat, May 2, 2009 at 9:01 PM, Georg Brandl g.bra...@gmx.net wrote:
Hi,
this is just a short notice that Mattias Brändström and I have finished a
patch to
On Thu, Apr 23, 2009 at 11:21 AM, cyberGn0m cy6erg...@gmail.com wrote:
Somebody knowns, is python3 works on arm-linux. Is it possible to build it?
Where to find related discussions? Maybe some special patches already
available? Should i try to get sources from svn or get known version
On Sun, Apr 5, 2009 at 3:54 PM, Nick Coghlan ncogh...@gmail.com wrote:
Antoine Pitrou wrote:
James Y Knight foom at fuhm.net writes:
It seems that a separate method _internal_close should've been
defined to do the actual closing of the file, and the close() method
should've been defined
On Tue, Mar 31, 2009 at 5:42 PM, Tres Seaver tsea...@palladion.com wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Stephen J. Turnbull wrote:
I also just wrote a long post about the comparison of bzr to hg
responding to a comment on baz...@canonical.com. I won't recap it
here but
On Tue, Mar 31, 2009 at 5:42 PM, Tres Seaver tsea...@palladion.com wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Stephen J. Turnbull wrote:
I also just wrote a long post about the comparison of bzr to hg
responding to a comment on baz...@canonical.com. I won't recap it
here but
On Tue, Mar 31, 2009 at 6:33 PM, Alexandre Vassalotti alexan...@peadrop.com
wrote:
...
html https://lists.ubuntu.com/archives/bazaar/2009q1/055850.html
https://lists.ubuntu.com/archives/bazaar/2009q1/055872.html
Perfect, thanks!
Alex
___
On Tue, Mar 31, 2009 at 6:33 PM, Alexandre Vassalotti alexan...@peadrop.com
wrote:
...
html https://lists.ubuntu.com/archives/bazaar/2009q1/055850.html
https://lists.ubuntu.com/archives/bazaar/2009q1/055872.html
Perfect, thanks!
Alex
___
On Sat, Feb 14, 2009 at 3:22 AM, Ned Deily n...@acm.org wrote:
...
have done complete and thorough testing. (In particular, I have no
access to a G5 for 64-bit PPC testing.)
I have a PowerMac G5 at home and I'll be glad to run tests if it
helps. (It runs 10.5: family pack licenses are
I wonder if there's some desiderata left for future Python versions to
make this standard behavior easier (for C-coded, Python-coded, and
Cython-coded classes, ones made by SWIG, etc) without too much black
magic...
Alex
On Mon, Dec 1, 2008 at 1:30 AM, Filip Gruszczyński [EMAIL PROTECTED] wrote:
On Sun, Nov 30, 2008 at 2:02 PM, Filip Gruszczyński [EMAIL PROTECTED] wrote:
Yeah, any time someone implements their own attribute lookup process for
a class (be it via __getattr__, __getattribute__ or the C equivalents),
it is up to the reimplementation to appropriately format their error
On Fri, Nov 28, 2008 at 9:47 AM, Steven D'Aprano [EMAIL PROTECTED] wrote:
On Sat, 29 Nov 2008 03:30:49 am Christian Heimes wrote:
...
May I point you to the two leading underscores? The name '__import__'
clearly suggests that the function is part of Python's internals. By
definition all
On Sun, Nov 2, 2008 at 5:42 AM, Barry Warsaw [EMAIL PROTECTED] wrote:
...
A dvcs means that people can publish their branches in a wide variety of
ways. Trusted developers can push their branches to code.python.org.
Non-core developers can use one of the free public dvcs branch hosting
Meanwhile, can you please release (wherever you normally release
things;-) the pure-Python version as well? I'd like to play around
with it in Google App Engine opensource sandboxes (e.g., cfr.
gae-json-rest -- I'll be delighted to add you to that project if you
want of course;-) and that
Unbelievable as this may seem, this crazy over-committing malloc
behavior is by now a classic -- I first fought against it in 1990,
when IBM released AIX 3 for its then-new RS/6000 line of workstations;
in a later minor release they did provide a way to optionally switch
this off, but, like on
On Tue, Aug 26, 2008 at 10:24 PM, Michele Simionato
[EMAIL PROTECTED] wrote:
...
.. code-block:: python
def include_mixin(mixin, cls): # could be extended to use more mixins
# traits as in Squeak take the precedence over the base class
dic = vars(mixin).copy() # could be extended
I thought that's what we had __index__ for -- reject arguments that
don't SMOOTHLY turn into integers when an integer is actually
required!
Alex
On Mon, Jul 21, 2008 at 10:01 PM, Martin v. Löwis [EMAIL PROTECTED] wrote:
Well, the real problem is os.urandom(4.2) which goes to an unlimited loop:
On Thu, Jul 17, 2008 at 2:54 AM, Antoine Pitrou [EMAIL PROTECTED] wrote:
I said:
Let's just make assertRaises return the exception instance, it seems like it
feels the need correctly.
and I meant fills, not feels, obviously...
+1 : enriching the existing method in a way that's perfectly
On Sat, Jun 28, 2008 at 4:46 PM, Raymond Hettinger [EMAIL PROTECTED] wrote:
From: Mark Dickinson [EMAIL PROTECTED]
There's one other major difference between the C99 notation and the
current patch: the C99 notation includes a (hexa)decimal point. The
advantages of this include:
- the
On Wed, Jun 18, 2008 at 9:58 PM, Cesare Di Mauro [EMAIL PROTECTED] wrote:
Very very, interesting. Thanks. :)
Somebody thinks that Python is unsuitable to implement a DSL: IMO your
example prove the contrary. :D
As long as you're willing to do the DSL within the strictures of
Python syntax,
+1 on updating the FAQ. Maybe we could even have it notice that a
read-only version of the desired semantic for 'with' is easily hacked
with the *current* semantic of 'with'...:
@contextlib.contextmanager
def readonly(anobj):
caller_globals = sys._getframe(2).f_globals
saved_globals =
On Sat, Jun 14, 2008 at 1:24 PM, Simon Cross [EMAIL PROTECTED] wrote:
On Sat, Jun 14, 2008 at 10:19 PM, Cesare Di Mauro [EMAIL PROTECTED] wrote:
from Tkinter import *
I discourage this too. :)
And so do I, every single time I teach Python (which is pretty often,
even though many of those
The problem is more general: what if a member (of some external
object we're proxying one way or another) is named print (in Python
3), or class, or...? To allow foo.print or bar.class would require
pretty big changes to Python's parser -- I have vague memories that
the issue was discussed ages
On Fri, Jun 6, 2008 at 11:01 AM, Guido van Rossum [EMAIL PROTECTED] wrote:
On Thu, Jun 5, 2008 at 8:45 PM, Raymond Hettinger [EMAIL PROTECTED] wrote:
Does anyone actually need an int lookalike with binary methods but
cannot just inherit from int?
Does anyone actually need an int lookalike
On Wed, May 21, 2008 at 1:53 PM, Raymond Hettinger [EMAIL PROTECTED] wrote:
This thread has diverged a bit from the original topic.
I suggest going ahead and adding pyprocessing to the library.
IMO, its functionality is going to be an essential capability as
more and more computers ship with
On Mon, May 19, 2008 at 5:33 AM, Steven D'Aprano [EMAIL PROTECTED] wrote:
...
import this
The Zen of Python, by Tim Peters
...
There should be one-- and preferably only one --obvious way to do it.
There should be ONE OBVIOUS way to do it, not only one way.
The only one way phrasing is in
On Sun, May 4, 2008 at 3:31 AM, Raymond Hettinger [EMAIL PROTECTED] wrote:
...
for k,g in groupby(iterable, key=lambda r: (r[0].lower(), r[5].lower())):
...
lastname_firstname = lambda r: (r[0].lower(), r[5].lower())
for k, g in groupby(iterable, key=lastname_firstname): ...
That
On Fri, May 2, 2008 at 11:32 PM, Mike Klaas [EMAIL PROTECTED] wrote:
...
Sorry, that was a bad example. It is obviously silly if the return value
of the function is callable.
...and yet it's *exactly* what keeps happening to lambda-happy
programmers -- in production code as well as
On Sat, May 3, 2008 at 2:28 PM, Brett Cannon [EMAIL PROTECTED] wrote:
...
I'd be great to integrate this with the bug tracker so that all submitted
patches automagically show up in codereview with links to one another.
Yeah, or a simple button to move it over there. Either way some
On Tue, Mar 25, 2008 at 9:43 AM, Nick Coghlan [EMAIL PROTECTED] wrote:
...
Since we have some strong use cases at least for the bytes-int case,
consistency then suggests that the other numeric types should all accept
bytes as well (interpreting them as ASCII encoded strings).
+1 -- it
Hmmm, sorry if I'm missing something obvious, but, if the occasional
background computations are sufficiently heavy -- why not fork, do
said computations in the child thread, and return the results via any
of the various available IPC approaches? I've recently (at Pycon,
mostly) been playing
On Mon, Mar 10, 2008 at 3:57 AM, Forrest Voight [EMAIL PROTECTED] wrote:
I am not sure what you are trying to propose here. The slice object
isn't special, it's just a regular built-in type.
The idea is to have slice objects be generators. You could make a
slice like 1:10:2 , and
Depending on which implementation[s] you want to target, Michal, you
should also check out PyPy at http://codespeak.net/pypy/, IronPython
at http://www.codeplex.com/IronPython, and Jython at
http://www.jython.org/ -- Jython's currently a tad behind the other
three, but Sun Microsystems has just
On Sun, Mar 2, 2008 at 10:39 AM, Gregory P. Smith [EMAIL PROTECTED] wrote:
On 3/2/08, Christian Heimes [EMAIL PROTECTED] wrote:
Alex Martelli wrote:
Yep, but please do keep the PyUnicode for str and PyString for bytes
(as macros/synonnyms of PyStr and PyBytes if you want!-) to help
On Sat, Mar 1, 2008 at 11:11 AM, Barry Warsaw [EMAIL PROTECTED] wrote:
...
I also propose translations of the shorter text to important languages
like French, German, Japanese, Portuguese and Spanish. I'm willing to
help with the German translation.
Cool, thanks.
I'd like to
On Sat, Mar 1, 2008 at 12:14 PM, Christian Heimes [EMAIL PROTECTED] wrote:
...
The 3.0 API isn't stable yet. I plan to rename some of the functions
before the first beta is released. Currently the naming schema is too
confusing:
PyUnicode - str
PyString - bytes
PyBytes - bytearray
On 10/12/07, Martin v. Löwis [EMAIL PROTECTED] wrote:
The problem may be related to the fact that Python is rarely teached at
school or university. I know no school or university in Germany that is
teaching Python.
I teach Python to the first semester, at the Hasso-Plattner-Institut
in
On 9/28/06, tomer filiba [EMAIL PROTECTED] wrote:
I'm sceptical that these would find use in practice.
[..]
Also, I question the utility of maintaining a weakref to a method or
attribute instead of holding one for the object or class. As long as
the enclosing object or class lives, so
On Aug 23, 2006, at 2:22 PM, K.S.Sreeram wrote:
Hi all,
I noticed in Python/ceval.c that LOAD_GLOBAL uses a dictionary lookup,
and was wondering if that can be optimized to a simple array lookup.
If i'm right there are 3 kinds of name lookups: locals, outer
scopes(closures), and globals.
On Aug 23, 2006, at 3:29 PM, Thomas Wouters wrote:
Since Alex isn't on python-dev, forwarding this for his convenience
(he said he wanted to reply.)
Thanks! I _am_ on Python-Dev (otherwise couldn't read what you're
forwarding here), but not on Python-Checkins (where the discussion
was
On Aug 23, 2006, at 3:13 PM, [EMAIL PROTECTED] wrote:
Zitat von Tim Peters [EMAIL PROTECTED]:
Huh. It's been a (mildly controversial, but intentional all the
same)
feature that Python tries to raise raise OverflowError on overflowing
libm operations. Doesn't work all that well, since
On Aug 19, 2006, at 3:28 AM, Steve Holden wrote:
...
It's going to be very interesting to see what comes out of the Google
sprints. I am sure the 64-bitters will be out in force, so there'll be
Hmmm, we'll be working on our laptops, as is typical of sprints, so
I'm not sure how many
What about doing it with a per-thread-timeout in TLS (overriding the
global one if a thread does have it set in its TLS)? Not as clean,
but perhaps far easier to implement than patching dozens of
modules/functions/classes to provide timeout= options everywhere...
Alex
On 7/5/06, Guido van
In Italian that would be DBAV (Dittatore benevolo a vita)...;-)
Alex
On 7/5/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Frank That said, I still regard Samuele Pedroni as the ultimate
Frank authority on Jython and give him pretty much full veto power. He
Frank fortunately
On 6/22/06, Guido van Rossum [EMAIL PROTECTED] wrote:
...
(1) An expression of the form 'static' atom has the semantics of
evaluating the atom at the same time as the nearest surrounding
function definition. If there is no surrounding function definition,
'static' is a no-op and the
...claims:
Note that for even rather small len(x), the total number of
permutations of x is larger than the period of most random number
generators; this implies that most permutations of a long
sequence can never be generated.
Now -- why would the behavior of most random number generators be
On Jun 10, 2006, at 1:08 PM, Josiah Carlson wrote:
Josiah Carlson [EMAIL PROTECTED] wrote:
Alex Martelli [EMAIL PROTECTED] wrote:
...claims:
Note that for even rather small len(x), the total number of
permutations of x is larger than the period of most random number
generators
On May 26, 2006, at 6:27 PM, Steve Holden wrote:
Greg Ewing wrote:
Fredrik Lundh wrote:
roughly speaking, epoll is kqueue for linux.
There are many different select-like things around now
(select, poll, epoll, kqueue -- are there others?) and
random combinations of them seem to be
already downloaded it, or it's
acceptable for someone else to host it, there's once again no way to
build Python with free tools :-(
[...]
Actually, it's apparently still there, just at a different URL.
Somebody posted the new URL on c.l.py a day or two back (Alex
Martelli started
On Apr 24, 2006, at 12:19 AM, Martin v. Löwis wrote:
Martin v. Löwis wrote:
- Paul Moore has contributed a Python build procedure for the
free version of the 2003 compiler. This one is without IDE,
but still, it should allow people without a VS 2003 license
to work on Python itself;
On Apr 24, 2006, at 12:48 AM, Neil Hodgson wrote:
Martin v. Löwis:
Apparently, the status of this changed right now: it seems that
the 2003 compiler is not available anymore; the page now says
that it was replaced with the 2005 compiler.
Should we reconsider?
I expect Microsoft means
On Apr 24, 2006, at 1:24 AM, Paul Moore wrote:
On 4/24/06, Neil Hodgson [EMAIL PROTECTED] wrote:
Martin v. Löwis:
Apparently, the status of this changed right now: it seems that
the 2003 compiler is not available anymore; the page now says
that it was replaced with the 2005 compiler.
On Apr 21, 2006, at 7:46 AM, Aahz wrote:
On Fri, Apr 21, 2006, Mateusz Rukowicz wrote:
Next thing I would add is multi precision floating point type to
the core and fraction type, which in some cases highly improves
operations, which would have to be done using floating point instead.
Of
On 4/21/06, Mateusz Rukowicz [EMAIL PROTECTED] wrote:
...
So I think the most valuable of my ideas would be improving long int +
coding decimal in C. Anyway, I think it would be possible to add other
ideas later.
I see redo Decimal in C (possibly with the addition of some fast
elementary
Back from vacation, just did an svn up and make, and...:
...
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes Parser/acceler.o
Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o
Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o Parser/
firstsets.o Parser/grammar.o
On 4/6/06, Martin Blais [EMAIL PROTECTED] wrote:
...
So I had the following idea: would it not be nice if there existed a
string-prefix 'i' -- a string prefix like for the raw (r'...') and
unicode (u'...') strings -- that would mark the string as being for
i18n? Something like this
On Apr 4, 2006, at 10:53 PM, Jess Austin wrote:
Alex wrote:
import collections
def tally(seq):
d = collections.defaultdict(int)
for item in seq:
d[item] += 1
return dict(d)
I'll stop lurking and submit the following:
def tally(seq):
return dict((group[0],
On Apr 5, 2006, at 8:30 PM, Greg Ewing wrote:
A while ago there was some discussion about including
elementtree in the std lib. I can't remember what the
conclusion about that was, but if it does go ahead,
I'd like to suggest that it be reorganised a bit.
I've just started playing with it,
It's a bit late for 2.5, of course, but, I thought I'd propose it
anyway -- I noticed it on c.l.py.
In 2.3/2.4 we have many ways to generate and process iterators but
few accumulators -- functions that accept an iterable and produce
some kind of summary result from it. sum, min, max, for
On Apr 4, 2006, at 8:01 AM, Jeremy Hylton wrote:
On 4/4/06, Alex Martelli [EMAIL PROTECTED] wrote:
import collections
def tally(seq):
d = collections.defaultdict(int)
for item in seq:
d[item] += 1
return dict(d)
...
Putting it somewhere in collections seems
On 4/4/06, Raymond Hettinger [EMAIL PROTECTED] wrote:
[Alex]
This is quite general and simple at the same time: for example, it
was proposed originally to answer some complaint about any and all
giving no indication of the count of true/false items:
tally(bool(x) for x in seq)
would
On Mar 27, 2006, at 7:20 AM, Raymond Hettinger wrote:
Why don't we expose _PySet_Next() for Barry and leave it out of the
public API
for everyone else.
There are precedents for adding some functionality to the C API but
not documenting it to ensure non advanced users don't get hurt --
On Mar 26, 2006, at 8:43 AM, Raymond Hettinger wrote:
[Aahz]
Speaking as a person who does relatively little C programming, I
don't
see much difference between them. The first example is more
Pythonic --
for Python. I agree with Barry that it's not much of a virtue for C
code.
It
On Mar 25, 2006, at 9:57 PM, Aahz wrote:
I'd really like to see someone else who understands the issues (i.e.
using the Python C-API) weigh in. Both Barry and Raymond are clever
programmers who generally understand what's Pythonic, and I find
myself
agreeing with whoever posted last.
On Mar 19, 2006, at 7:42 PM, Guido van Rossum wrote:
...
There seem to be other places where Python is beginning to require
parens
even though they aren't strictly necessary to resolve syntactic
ambiguity.
In the style guide only, I hope. The parens that are mandatory in a
few
On Mar 16, 2006, at 7:30 PM, Brett Cannon wrote:
...
I agree. as is taking on the use of assignment in statements that
are not ``=`` and I say we just keep on with that. Plus Greg's above
Hmmm, if we allowed '(expr as var)' for generic expr's we'd make
a lot of people pining for
On Mar 13, 2006, at 12:29 PM, Fabiano Sidler wrote:
Hi folks!
Hello Fabiano! The proper venue for your interesting issues is
comp.lang.python (or the equivalent mailing list), where all sorts of
people will be able to hear you, discuss things, and help out.
python-dev is strictly for
On Mar 12, 2006, at 11:16 AM, Ian Bicking wrote:
...
memoize seems to fit into functools fairly well, though deprecated not
so much. functools is similarly named to itertools, another module
that
is kind of vague in scope (though functools is much more vague).
partial would make just
On Mar 7, 2006, at 6:15 AM, Georg Brandl wrote:
Hi,
while as is being made a keyword, I remembered parallels between
with
and a proposal made some time ago:
with expr as f:
do something with f
while expr as f:
do something with f
if expr as f:
do something with f
On Mar 7, 2006, at 7:29 AM, Steve Holden wrote:
...
In fact, I think the below examples are reasonable uses
that do a better job of expressing intent than the if
statement would. I just don't like the mental backtrack
they require, and would like some sort of advance
warning.
On Mar 6, 2006, at 4:43 PM, Bob Ippolito wrote:
On Mar 6, 2006, at 4:14 PM, Guido van Rossum wrote:
...
I wonder if this use case and the frequently requested
case-insensitive dict don't have some kind of generalization in
common
-- perhaps a dict that takes a key function a la
On Mar 6, 2006, at 10:17 AM, Tim Peters wrote:
...
How's everyone doing, BTW?
Swimmingly, thanks! Too busy to breathe, or come to pycon:-(, but,
happy as a lark.
I think I picked up the Texas Mystery
Disease from Holger Krekel -- bed-ridden 20 hours Saturday, and most
of Sunday, with
On Mar 6, 2006, at 9:17 AM, Jim Jewett wrote:
...
I think that adding parentheses would help, by at least signalling
that the logic is longer than just the next (single) expression.
level = (0 if absolute_import in self.futures else -1)
+1 (just because I can't give it
On Feb 25, 2006, at 4:43 PM, [EMAIL PROTECTED] wrote:
Zitat von Facundo Batista [EMAIL PROTECTED]:
The question is, it's ok to use a third party system for this
initiative? Or you (we) prefer to host it in-house? Someone alredy
thought of this?
I thought about it at one time, and I think
:
Guido van Rossum
Alex Martelli
many other worthies snipped
T-shirts? I'm an absolute fan of T-shirts...!-)
The point is that I don't know some of you, so please grab my shoulder
here in PyCon. And if you're not coming to the conference but somebody
can carry it to you, just let me know
On Feb 22, 2006, at 7:21 AM, Raymond Hettinger wrote:
...
I'm somewhat happy with the patch as it stands now. The only part
that needs serious rethinking is putting on_missing() in regular
dicts. See my other email on that subject.
What if we named it _on_missing? Hook methods
On Feb 21, 2006, at 1:51 AM, Greg Ewing wrote:
...
Just one more thing -- have you made a final decision
about the name yet? I'd still prefer something like
'autodict', because to me 'defaultdict' suggests
autodict is shorter and sharper and I prefer it, too: +1
etc.) it seems more
On Feb 20, 2006, at 5:41 AM, Guido van Rossum wrote:
...
Alternative A: add a new method to the dict type with the semantics of
__getattr__ from the last proposal, using default_factory if not None
(except on_missing is inlined). This avoids the discussion about
broken invariants, but one
On Feb 20, 2006, at 8:35 AM, Raymond Hettinger wrote:
[GvR]
I'm not convinced by the argument
that __contains__ should always return True
Me either. I cannot think of a more useless behavior or one more
likely to have
unexpected consequences. Besides, as Josiah pointed out, it is
On Feb 20, 2006, at 12:33 PM, Guido van Rossum wrote:
...
You don't need a new feature for that use case; d[k] = d.get(k, 0) + 1
is perfectly fine there and hard to improve upon.
I see d[k]+=1 as a substantial improvement -- conceptually more
direct, I've now seen one more k than I had
On Feb 20, 2006, at 12:38 PM, Aahz wrote:
...
Can you say, for the record (since nobody else seems to care), if
d.getorset(key, func) would work in your use cases?
Because I haven't been reading this thread all that closely, you'll
have
to remind me what this means.
Roughly the same
On Feb 20, 2006, at 3:04 PM, Brett Cannon wrote:
...
- Yes and it should be the only constructor argument. This is my
...
While #3 is my preferred solution as well, it does pose a Liskov
violation if this is a direct dict subclass instead of storing a dict
How so? Liskov's
On Feb 20, 2006, at 5:05 PM, Raymond Hettinger wrote:
[Alex]
I see d[k]+=1 as a substantial improvement -- conceptually more
direct, I've now seen one more k than I had seen before.
[Guido]
Yes, I now agree. This means that I'm withdrawing proposal A (new
method) and championing only B (a
On Feb 21, 2006, at 6:53 AM, Bengt Richter wrote:
Perhaps a more informative message would be nice.
Here's an easy way to trigger it:
compile(#-*- coding: ascii -*-\nprint 'ab%c'\n%0x80, '','exec')
Traceback (most recent call last):
File stdin, line 1, in ?
MemoryError
Definitely
On Feb 18, 2006, at 12:38 AM, Georg Brandl wrote:
Guido van Rossum wrote:
WFM. Patch anyone?
Done.
http://python.org/sf/1434038
I reviewed the patch and added a comment on it, but since the point
may be controversial I had better air it here for discussion: in 2.4,
On 2/16/06, Guido van Rossum [EMAIL PROTECTED] wrote:
A bunch of Googlers were discussing the best way of doing the
...
Wow, what a great discussion! As you'll recall, I had also mentioned
the callable factory as a live possibility, and there seems to be a
strong sentiment in favor of that;
On 2/17/06, Georg Brandl [EMAIL PROTECTED] wrote:
Ian Bicking wrote:
Unfortunately, a @property decorator is impossible...
It already works! But only if you want a read-only property. Which is
actually about 50%+ of the properties I create. So the status quo is
not really that bad.
On Feb 15, 2006, at 9:51 AM, Barry Warsaw wrote:
On Wed, 2006-02-15 at 09:17 -0800, Guido van Rossum wrote:
Regarding open vs. opentext, I'm still not sure. I don't want to
generalize from the openbytes precedent to openstr or openunicode
(especially since the former is wrong in 2.x and the
On 2/14/06, Just van Rossum [EMAIL PROTECTED] wrote:
...
Maybe it's even better to use opentext() AND openbinary(), and deprecate
plain open(). We could even introduce them at the same time as bytes()
(and leave the open() deprecation for 3.0).
What about shorter names, such as 'text'
On 2/13/06, Guido van Rossum [EMAIL PROTECTED] wrote:
...
I don't like to add a built-in index() at this point; mostly because
of Occam's razor (we haven't found a need).
I thought you had agreed, back when I had said that __index__ should
also be made easily available to implementors of
On Feb 10, 2006, at 1:05 PM, Raymond Hettinger wrote:
[Guido van Rossum]
PEP 351 - freeze protocol. I'm personally -1; I don't like the
idea of
freezing arbitrary mutable data structures. Are there champions who
want to argue this?
It has at least one anti-champion. I think it is a
On 2/10/06, Guido van Rossum [EMAIL PROTECTED] wrote:
...
Next, the schedule. Neal's draft of the schedule has us releasing 2.5
in October. That feels late -- nearly two years after 2.4 (which was
released on Nov 30, 2004). Do people think it's reasonable to strive
for a more aggressive (by
On 2/9/06, Travis E. Oliphant [EMAIL PROTECTED] wrote:
...
The patch adds a new API function int PyObject_AsIndex(obj).
This was not specifically in the PEP but probably should be. The name
could also be PyNumber_AsIndex(obj) but I was following the nb_nonzero
slot example to help write
On 2/7/06, Fredrik Lundh [EMAIL PROTECTED] wrote:
...
what other reactive socket framework is there that would fit well into
the standard library ? is twisted really simple enough ?
Twisted is wonderful, powerful, rich, and very large. Perhaps a small
subset could be carefully extracted
On 2/6/06, Guido van Rossum [EMAIL PROTECTED] wrote:
On 2/6/06, Donovan Baarda [EMAIL PROTECTED] wrote:
yeah... the problem is differentiating the empty set from an empty dict.
The only alternative that occured to me was the not-so-nice and
not-backwards-compatible {:} for an empty dict and
On 2/6/06, Guido van Rossum [EMAIL PROTECTED] wrote:
...
What we should do in 3.0 is not entirely clear to me. It would be nice
if there was only a single type (named 'int', of course) with two
run-time representations, one similar to the current int and one
similar to the current long. But
On 2/6/06, Aahz [EMAIL PROTECTED] wrote:
...
def areclose(x, y, relative_err = 1.e-5, absolute_err=1.e-8):
diff = abs(x - y)
ave = (abs(x) + abs(y))/2
return diff absolute_err or diff/ave relative_err
Also, separating the two terms with 'or' rather than '+' makes the
two
When teaching some programming to total newbies, a common frustration
is how to explain why a==b is False when a and b are floats computed
by different routes which ``should'' give the same results (if
arithmetic had infinite precision). Decimals can help, but another
approach I've found
1 - 100 of 174 matches
Mail list logo