can put "__metaclass__ == type" at the top of modules :)
I always use new style classes so I only have to remember one set of behaviors.
"__metaclass__ = type" is warty, it has the "action at a distance" problem that
decorators solve for functions. I didn
someone
else won't notice.
[in fact we had a guy who was "downsized" for doing things like calling
database queries on the return value of a function that was documented
as returning True/False]
Perl shops require long style guides becuase perl is, ummm, perl. Python
is a b
d,
thus, potentially non-posix-compliant) code...
This problem is currently stopping Python 2.4.1 to compile on this
platform, so if anyone can provide any insight that would be very
helpful...
--
Jack Jansen, <[EMAIL PROTECTED]>, http://www.cwi.nl/~jack
If I can't dance I don't w
On Mon, Mar 28, 2005 at 09:25:18AM -0800, Michael Chermside wrote:
> Josiah Carlson writes:
>
> [... stuff about reST and TeX ...]
> > While I have not used it often, I have done the equivalent of decorating
> > classes; it is as natural (though perhaps not quite as useful initially)
> > as d
On Sat, Mar 26, 2005 at 12:36:08PM -0800, Josiah Carlson wrote:
>
> Eric Nieuwland <[EMAIL PROTECTED]> wrote:
> >
> > Given the ideas so far, would it possible to:
> >
> > def meta(cls):
> > ...
> >
> > @meta
> > class X(...):
> > ...
>
> It is not implemented in Python 2.4. From what
C) stored 32 bit
integers in middle-endian (high-order word first, but low-order byte
first).
But note that neither of the PDP-11 FPUs were IEEE, that was a much
later invention. At least, I didn't come across it until much later:-)
--
Jack Jansen, <[EMAIL PROTECTED]>, http://www.cwi.nl
On Sat, Apr 16, 2005 at 07:24:27PM -0400, Barry Warsaw wrote:
> On Thu, 2005-04-14 at 23:46, Barry Warsaw wrote:
> > I've noticed an apparent inconsistency in the exception thrown for
> > read-only properties for C extension types vs. Python new-style
> > classes.
>
> I haven't seen any follow ups
On Sun, Apr 17, 2005 at 11:53:31AM -0400, Jack Diederich wrote:
> On Sat, Apr 16, 2005 at 07:24:27PM -0400, Barry Warsaw wrote:
> > On Thu, 2005-04-14 at 23:46, Barry Warsaw wrote:
> > > I've noticed an apparent inconsistency in the exception thrown for
> > > read
On Tue, Apr 19, 2005 at 01:33:15PM -0700, Guido van Rossum wrote:
> > @acquire(myLock):
> > code
> > code
> > code
>
> It would certainly solve the problem of which keyword to use! :-) And
> I think the syntax isn't even ambiguous -- the trailing colon
> distinguishes this from the fun
On Mon, May 16, 2005 at 06:24:59PM +1200, Greg Ewing wrote:
> Brett C. wrote:
>
> > Nick's was obviously directly against looping, but, with no offense to Nick,
> > how many other people were against it looping? It never felt like it was a
> > screaming mass with pitchforks but more of a "I don't
On Mon, May 16, 2005 at 08:09:54PM -0500, Ka-Ping Yee wrote:
> On Mon, 16 May 2005, Aahz wrote:
> > I'll comment here in hopes of staving off responses from multiple
> > people: I don't think these should be double-underscore attributes. The
> > currently undocumented ``args`` attribute isn't doub
On Mon, May 16, 2005 at 10:11:47PM -0400, Jack Diederich wrote:
> The values are never shared by expections of the class
^^
s/expect/except/
Exceptions are expected by except statements - and ispell can't tell the
difference.
-
};
> ...
> if (!PyArg_ParseTupleAndKeywords(args,kws,format,kwslist,&a1))
> goto onError;
At least this appears to work...
--
Jack Jansen, <[EMAIL PROTECTED]>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma
Goldman
_
nk that back when the gas price was just below 10 SEK/L,
> but they found a way...
>
Of course they found a way. The alternative was cutting taxes.
whish-I-was-winking,
-Jack
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.or
On Thu, Feb 16, 2006 at 01:11:49PM -0800, Guido van Rossum wrote:
[snip]
> Google has an internal data type called a DefaultDict which gets
> passed a default value upon construction. Its __getitem__ method,
> instead of raising KeyError, inserts a shallow copy (!) of the given
> default value into
y
many user defined objects. By assigning the default value in __getitem__ the
returned value can be manipulated via its methods.
-Jack
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
htt
's that "Java/1.4.2_03" user agent doing? (it's responsible for
> > 10% of all hits in january/february, and 20% of the hits today...)
>
> Most likely a crawler.
>
Youch, if I'm reading it right it consumed fully half of the bandwidth
for today on python.org
bject equivalent to the one I am checking for.
>>> a = set([1,2,3,4])
>>> b = set([1,2,3,4])
>>> a == b
True
>>> a is b
False
>>> container = [a]
>>> b in container
True
>>> container = [id(a)]
>>> id(b) in container
False
&g
to push this
> > into 2.5 though; how about 2.6?
>
> Wasn't there already a (pretty small) patch? I guess it would be
> different now with the AST though.
>
I submitted one a couple years ago. The AST makes it obsolete though.
I'd be happ
On Wed, Mar 29, 2006 at 01:11:06AM -0500, Fred L. Drake, Jr. wrote:
> On Wednesday 29 March 2006 00:48, Fred L. Drake, Jr. wrote:
> > I think the existing usage for classes is perfectly readable. The
> > @-syntax works well for functions as well.
>
> On re-reading what I wrote, I don't think I
On Wed, Mar 29, 2006 at 07:23:03PM -0500, Phillip J. Eby wrote:
> At 11:07 AM 3/29/2006 -0800, Guido van Rossum wrote:
> >On 3/28/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> > > If we're using Zope 3 as an example, I personally find that:
> > >
> > > class Foo:
> > > """Docstring
[promted by Phillip Eby's post, but not in response so content snipped]
I think we both want class decorators as a more fine grained substitute
for __metaclass__ (fine grained as in declared per-class-instance instead
of this-class-and-all-its-children). I can think of three ways class
decorators
.
The CCP Games CEO said they have trouble retaining talent from more
moderate latitudes for this reason. 18 hours of daylight makes them a
bit goofy and when the Winter Solstice rolls around they are apt to go
quite mad.
-Jack
___
Python-Dev mailing
for things that
have some extra setup involved (tuples have a free list for each length).
-Jack
___
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
; bgenVariable.py scantools.py
> Log Message:
> Normalize whitespace to avoid offending Bug Day volunteers.
Argh, sorry... I thought I had all my machines educated to do tab
expansion for Python, but apparently not...
--
Jack Jansen, <[EMAIL PROTECTED]>, http://www.cwi.nl/~jack
If
; "fails".
I use else similarly, for defensive programming.
for (thing) in searchlist:
if (matches(thing)):
keeper = thing
break
else:
raise ValueError("No thing matches()")
I can't say I use it for much else, if I really want a default I do
found = None
On Sat, Jul 30, 2005 at 06:41:51PM +1000, Nick Coghlan wrote:
> Brett Cannon wrote:
> > Don't forget this is Python 3.0; if it makes more sense we can break code.
>
> Or if he can be persuaded that ControlFlowException should exist as a peer of
> Exception and CriticalException. . .
>
> >>>+
client_name = names[client_id]
ValueError, TypeError, AttributeError (2 instances)
ValueError, TypeError, KeyError (3 instances)
ValueError, TypeError, IndexError (3 instances)
And finally this one because bsddb can say "Failed" in more than one way.
enough. bzr might make it even easier but svn
is familiar and it will work right now. I haven't submitted a patch in
ages partly because using anonymous SF cvs plain doesn't work.
aside, at work we switched from cvs to svn and it the transition was
easy for developers, svn lives up to
On Thu, Sep 01, 2005 at 07:58:40PM +0200, Paolino wrote:
> Working on a tree library I've found myself writing
> itertools.chain(*[child.method() for child in self]).
> Well this happened after I tried instinctively
> itertools.chain(child.method() for child in self).
>
> Is there a reason for t
On Thu, Sep 01, 2005 at 02:46:13PM -0600, Charles Cazabon wrote:
> Bill Janssen <[EMAIL PROTECTED]> wrote:
> > I don't use "print" myself much, but for the occasional 3-line script.
> > But I think the user-friendliness of it is a good point, and makes up
> > for the weirdness of it all. There's s
On Thu, Sep 01, 2005 at 11:12:57PM +0200, Fredrik Lundh wrote:
> Charles Cazabon wrote:
>
> > in fact, it does nothing for the program but merely has the interesting
> > side-effect of writing to stdout.
>
> yeah, real programmers don't generate output.
>
I'd say:
yeah, real programmers don't
On Tue, Sep 20, 2005 at 10:20:44AM -0700, Josiah Carlson wrote:
> Try using the code I offered. It allows the cross of an aribitrary
> number of restartable iterables, in the same order as an equivalent list
> comprehension or generator expression.
>
> >>> list(cross([1,2], [3,4], [5,6]))
> [(1,
On Tue, Sep 20, 2005 at 09:04:53AM -0700, Guido van Rossum wrote:
> On 9/20/05, Michael Hudson <[EMAIL PROTECTED]> wrote:
> > Guido van Rossum <[EMAIL PROTECTED]> writes:
> >
> > > On 9/19/05, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> > >> I propose that in Py3.0, the "and" and "or" operators
On Fri, Oct 07, 2005 at 12:15:04PM -0700, Martin Maly wrote:
> Hello Python-Dev,
>
> My name is Martin Maly and I am a developer at Microsoft, working on the
> IronPython project with Jim Hugunin. I am spending lot of time making
> IronPython compatible with Python to the extent possible.
>
> I
ople developing Python. Even during times when I
am actively following python-dev it would be handy to have important
announcements coming in in a separate mailbox in stead of buried
under design discussions and such...
--
Jack Jansen, <[EMAIL PROTECTED]>, http://www.cwi.nl/~jack
If I can
On 3-nov-2005, at 22:36, Oleg Broytmann wrote:
> On Thu, Nov 03, 2005 at 10:29:37PM +0100, Jack Jansen wrote:
>
>> I know I would be much helped with a moderated python-dev-announce
>> mailing list, which would be only low-volume
>>
>
>http://www.google.com/se
There don't seem to be any mac-specific modules involved...
> Leak: 0x0118ad10 size=80
> Call stack: call_function | AE_AECreateDesc | AECreateDesc | operator
> new(unsigned long)
Hmm, the first candidates here would be test_aepack and
test_scriptpackages, but neither one has an obvi
x27;%b').
The suggestion is to add 'b' as a sprintf-like format string
%[][.]b
Where the optional is the base to print in and is the optional
minimum length of chars to print (as I recall). Default is base 2.
Me? I like it.
-Jack
___
On Tue, Jan 17, 2006 at 06:11:36PM -0800, Bob Ippolito wrote:
>
> On Jan 17, 2006, at 5:01 PM, Jack Diederich wrote:
>
> >On Tue, Jan 17, 2006 at 04:02:43PM -0800, Guido van Rossum wrote:
> >>On 1/17/06, Adam Olsen <[EMAIL PROTECTED]> wrote:
> >>>>
[Raymond Hettinger]
> [Armin Rigo]
> > BTW the reason I'm looking at this is that I'm considering adding
> > another undocumented internal-use-only method, maybe __getitem_cue__(),
> > that would try to guess what the nth item to be returned will be. This
> > would allow the repr of some iterators
e the C compiler
rightly complains that I'm passing a const object through a non-const
parameter).
Can anyone enlighten me?
--
Jack Jansen, <[EMAIL PROTECTED]>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma
Goldman
___
101 - 142 of 142 matches
Mail list logo