Whenever I run python I get
"Warning! you are running an untested version of Python."
prepended to the start of any output on stdout.
This is with Debian and python 2.3 (running the debian 2.1 and 2.2 binaries
doesn't have this effect)
Does anyone have any idea how to stop this or have even see
same thing) are VERY close in Java and Python.
I hope this is enough to show that static or dynamic is quite a
different issue -- Java's more or less statically typed, Python
dynamically, but their model of variables is VERY similar anyway.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
#x27;m
neither patriotic nor competitive, so I'd rather look forward to a world
entirely free of this blight -- but hey, where I can make a difference
is HERE, so, HERE is where I act.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
except (ImportError, KeyError, AttributeError), _xx:
print ' OOPS, error (%s): %s' % (_xx.__class__, _xx)
raise PicklingError(
and let us know exactly what his modified pickle.py outputs...?
Thanks,
Alex
--
http://mail.python.org/mailman/listinfo/python-list
(e.g.)
import the.real.hyper
sys.modules['hyper']=the.real.hyper
before you pickle; but I suspect UNpickling would fail in that case.
Using the standard library copy_reg module to register your way to
pickle and recover instances of your type might work better.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ing to current plans: I'll be able
to give more precise information later this year).
Alex
--
http://mail.python.org/mailman/listinfo/python-list
y ignore it. If standard Python changed in this respect, I would
of course take that into account in the next following edition!-)
Alex
--
http://mail.python.org/mailman/listinfo/python-list
uot;years of work down the drain": gmpy scratches the itch I made it
for, and occasional references to others using it are just a little
extra bonus, even if they do make my heart give a little jump of joy
each time I see one.
I think that's the spirit in which to do open-source development...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Timothy Fitz <[EMAIL PROTECTED]> wrote:
...
> Perhaps Tim Peters is far too
> concise for my feeble mind
It's Zen, it's beyond Mind. Let it speak to your True Self!
Alex
--
http://mail.python.org/mailman/listinfo/python-list
: Tk
support is there alright, it's Tcl/Tk which _isn't_. Get MacPython, its
PackageManager will explain where to get Tcl/Tk Aqua from, as a prereq
for Tkinter and IDLE!
Alex
--
http://mail.python.org/mailman/listinfo/python-list
u one bit in tracking down your leaks.
I would rather suggest you look into module gc...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ly. I guess that might be
considered "elegant", for suitably contorted meanings of "elegant"...
it's on the site, too, but I don't have the URL at hand. It's
instructive, anyway, but I wouldn't suggest actually using it in any
kind of production code...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
d the fact that the variable is also maintained upon normal
termination).
(musing...): I think the reason there's no real use case for using a
listcomp's control variable afterwards is connected to this distinction:
listcomps have no `break'...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ncise but nice in its own way (itertools.repeat gives an
empty iterator when its 2nd argument is <=0, of course).
Alex
--
http://mail.python.org/mailman/listinfo/python-list
n Activestate's
online cookbook -- I made some enhancements to it as I edited it for the
forthcoming 2nd edition of the cookbook (due out in a couple of months),
but the key ideas are in the online version too (sorry, no URL at hand).
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ementation, BTW, is "in between" -- some
buffering, but bounded consumption of memory -- but whether that tidbit
of pragmatics is part of the file specs, heh, that's anything but clear
(just as for other important tidbits of Python pragmatics, such as the
facts that list.sort is wickedly fast, 'x in alist' isn't, 'x in adict'
IS...).
Alex
--
http://mail.python.org/mailman/listinfo/python-list
rds compatibility reasons). Neither does it return a list: it
returns "an `xrange' object", a specialized type that's not an iterator,
though it's iterable. It's a type, btw:
>>> xrange
>>>
so it's not surprising that calling it returns instances of it
(enumerate and reversed are also types, but *WITH* 'next'...).
Alex
--
http://mail.python.org/mailman/listinfo/python-list
André Roberge <[EMAIL PROTECTED]> wrote:
> alex = CreateRobot()
> anna = CreateRobot()
>
> alex.move()
> anna.move()
H -- while I've long since been identified as a 'bot, I can assure
you that my wife Anna isn't!
Alex
--
http://mail.python.org/mailman/listinfo/python-list
it -- THIS way, assertRaises performs the call under its own
control (inside the try clause of a try/except statement) and can and
does catch and report things appropriately.
The frequency of this misunderstanding is high enough to prove to me
that strictness is not FULLY understood by some "intermediate level"
Pythonistas. However, I doubt the right solution is to complicate
Python with the ability to have some arguments be strict, and other
lazy, much as sometimes one might yearn for it. _Maybe_ one could have
some form that makes ALL arguments lazy, presenting them as an iterator
to the function itself. But even then the form _should_, I suspect, be
obvious at the call site, rather than visible only in the "def"...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Alex Martelli wrote:
>
> >> or (readable):
> >>
> >> if len(list) < n:
> >> list.extend((n - len(list)) * [item])
> >
> > I find it just as readable without the redundant if
e should probably fail
> noisily, or at least emit a warning.
Under what conditions, exactly, would you want such an exception?
Alex
--
http://mail.python.org/mailman/listinfo/python-list
hon.fyxm.net/pycon/papers/traits.html>. Facilitating such
presentation tasks (no doubt including editing) appears to be a major
driving force for Traits.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ssfully by now I've forgotten a lot
of the perl I used to know... care to clarify?
Alex
--
http://mail.python.org/mailman/listinfo/python-list
in range(30):
> > print c[i%len(c)]
>
> I don''t know if it's faster, but:
>
> >>> import itertools
> >>> c=['r','g','b','c','m','y','k']
> >>> for i in iterto
Paul Rubin <http://[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] (Alex Martelli) writes:
> > If it changed the semantics of for-loops in general, that would be quite
> > inconvenient to me -- once in a while I do rely on Python's semantics
> > (maintaining the loo
taining backwards
compat with this kind of horrors means listcomps need to keep leaking
until Python 3.0, alas. But hopefully no farther...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
in the check. Accepting just square brackets,
braces, commas, constant strings and numbers, and comments, should be
pretty safe -- we'd no doubt want to also accept minus (for unary
minus), plus (to make complex numbers), and specifically None, True,
False -- but that, it appears to me, still
<[EMAIL PROTECTED]> wrote:
...
> I think that this must have something to do with python expecting
> itself to by in a TTY? Can anyone give any idea of where I should be
> going with this?
http://pexpect.sourceforge.net/
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ll those who
need to keep using older versions of Python, though; to fit more recipes
in, the historical discussions of how you did things with Python 1.5.2,
1.6, 2.0 etc have been ruthlessly snipped...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
lf_ is going away right after being created...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ne):
show_help(m.group(1))
Demeter's Law suggests that the 'm.value.group' accesses in your
approach are better handled by having m delegate to its `value'; and the
repeated m.set(re.search( ... seem to be a slight code smell, violating
"once and only once", which suggests merging into a single `set' method.
Your approach is more general, of course.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
he like were what he was
> referring to, if you had read his first sentence:
>
> "I have seen some software written in python and delivered as binary form."
Sorry, Doug, not clear to me. I have seen, for example, some games
delivered with binary files with names such as something
ay.) ;)
Surely joining all the regexp's into one big one with | would be faster
and more compact, but, with variable numbers of groups per sub-regexp,
determining which regexp matched can perhaps be tricky (issues with
matching mo.lastindex to the correct sub-regexp). So, I can understand
the desire to do it sequentially, regexp by regexp.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
us Data Structures Equals Programs" *IS* all about?
Alex
--
http://mail.python.org/mailman/listinfo/python-list
less what you need is not just to determine
whether l contains a certain element but rather something different
(such as doing the same determination for several elements on an
unchanging l).
Alex
--
http://mail.python.org/mailman/listinfo/python-list
threads in my python script. So the important question is: are cookielib
and urllib2 thread safe? Are there any precautions that apply to using
these libs in a multi-threaded context?
thanks!
alex
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Good News!
Do you know how simple it is to go to Heaven after this life has ended?
Some people believe that belonging to a local church, temple, mosque or
synagogue will get them to Heaven.
Others believe that water baptism, obeying the ten commandments or just
being a good
rt at
<http://www.python.org/peps/pep-3000.html> -- while each of us will find
there some "complexity" one loves and uses often (be it lambda, buffer,
reload, ...), it's a good start.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
of the article you quote (although it acknowledges that
other think differently) is that better tools (including iterative, NOT
waterfall, development; and, agile programming approaches, more
generally) are the way to mitigate that horrid track record.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
binary".
In any case, since you need to open and read all the files to check them
for "being binary", either by your definition or whatever heuristics you
might prefer, you would really not ``excluded them from os.walk'', but
rather filter os.walk's results by these criteria.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ey're 0xFF
and 0xFE -- so they definitely don't qualify as ASCII.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
g_ part, most people might
be better served by "Learning Python" -- or, for that matter, the
already recommended "Practical Python" (it has many significant
completely worked-out example programs -- I was a TR for it, too) or
"Dive into Python" (VERY fast and meant for already-experienced
programmers -- I wasn't a TR for it, but, my _wife_ was...;-)
Alex
--
http://mail.python.org/mailman/listinfo/python-list
;"
I hope this concisely indicates that the problem (in today's current
implementations) is only with switching FROM iteration TO other
approaches to reading, and (if the file is seekable) there's nothing so
problematic here that a good old 'seek' won't cure...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
e.
(Untested code, as I don't have any 2.0 on which to test it anyway).
Alex
--
http://mail.python.org/mailman/listinfo/python-list
, ,
, , , , , ,
, , , , , , ]
Traipse through these, find one class that has an unbound method, get
that unbound method's func_globals, bingo.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Alex Martelli wrote:
> > Steven Bethard <[EMAIL PROTECTED]> wrote:
> >...
> >
> >>If I could see how to go from 'object' (or 'int', 'str', 'file', etc.)
> >&
ut hearsay to go on,
but IBM's compiler for PPC chips, and Intel's compiler for Intel chips,
appear to claim that they have excellent code generation, for example.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
equivalent to:
>
> self.m = type(self.__init__)(method, self, Test)
Another approach with the same result is to exploit the fact that a
function is a descriptor:
self.m = method.__get__(self, Test)
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Aahz <[EMAIL PROTECTED]> wrote:
...
> >>>> object.__subclasses__()
...
> One thing my company has done is written a ``safe_eval()`` that uses a
> regex to disable double-underscore access.
will the regex catch getattr(object, 'subclasses'.
Stephen Thorne <[EMAIL PROTECTED]> wrote:
> On Sat, 29 Jan 2005 08:53:45 -0600, Skip Montanaro <[EMAIL PROTECTED]> wrote:
> >
> > >> One thing my company has done is written a ``safe_eval()`` that uses
> > >> a regex to disable double-undersc
Skip Montanaro <[EMAIL PROTECTED]> wrote:
> Alex> I dunno, maybe I'm just being pessimistic, I guess...
>
> No, I think you are being realistic. I thought one of the basic tenets of
> computer security was "that which is not expressly allowed is forbidden&q
ere would still be use
cases for an in-process sandbox, although it's surely true that making
one would not be trivial.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
issing parts. What
you need to do in each case, I don't know...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
be considered
unless your project's budget for programming tools is Rubenesque? Do
you think the costliest professional compilers cannot EVER find, on any
given benchmark, some optimization worth a 25% speedup wrt the cheapest
or free compilers...?! I really can't believe you'd claim any of this.
Maybe you will want to clarify what, if anything, you mean here.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
mance
on different platforms. Trying to imply that this has ANYTHING to do
with the LANGUAGE the programs are coded in, as opposed to the compilers
and expenses one is willing to incur for them, is either an extremely
serious error of logic, if incurred in good faith, or else is an attempt
to &qu
thor of class Test means to pass in as
"method", it's not clear whether Test(divmod) or Test(staticmethod(foo))
is more likely to be of interest to them as a use case. If ``method''
is a function, which is both a descriptor AND callable, either approach
works; otherwise, one has to pick an approach, or try both approaches
with a try/except.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
UNCTION0
6 STORE_FAST 1 (g)
5 9 LOAD_FAST1 (g)
12 RETURN_VALUE
>>>
and:
>>> dis.dis(f.func_code.co_consts[1])
3 0 LOAD_FAST0 (x)
3 STORE_FAST
aster, because it fits my brain, rather than changing the way I think.
If Python doesn't fit YOUR brain, for example because your brain is
ossified around a craving for the declaration of variables, then, unless
you're specifically studying a new language just for personal growth
purposes, I think you might well be better off with a language that
DOES, at least until and unless your brain changes by other means.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
e corresponding value might be for.
It's HIGHLY advisable to have your __getattr__ methods raise
AttributeError for any requested name that starts and ends with double
underscores, possibly with some specific and specifically designed
exceptions.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
your bigint class a constructor (not declared as
``explicit'', if you're coding C++) which accepts as its argument a
python long might help...?
Alex
--
http://mail.python.org/mailman/listinfo/python-list
u might claim that, whatever percentage
it may be, it's "frittered away on inconsequential newsgroups".
Alex
--
http://mail.python.org/mailman/listinfo/python-list
just as ugly as one might imagine, but
fortunately quite marginal, so one can almost forget it.
I have nothing against a declarative style _per se_ -- it just doesn't
fit Python's "everything happens at runtime" overall worldview, and that
simple and powerful worldview is a good part of what makes Python tick
SO well. I think there's a space for declarative languages, and it is
mostly ``orthogonal'' to Python. See, for example,
<http://www.strakt.com/docs/ep04_caps.pdf>, specifically the part of the
presentation that's about BLAM -- that's a declarative language (with
embedded Python for ``actions'', e.g., triggers, and computations), and
I think a neat and useful design, too.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Michael Tobis <[EMAIL PROTECTED]> wrote:
> Alex Martelli wrote:
> > Michael Tobis <[EMAIL PROTECTED]> wrote:
>
> > he can perfectly
> > well correct his misexpression if he cares to -- not my job to try to
> > read his mind and perform exegesis on his w
elf._delegate supply them or be
responsible to raise AttributeError if necessary.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
(The log function expects a string)
What is the magic incantation to get the string I want so I can pass it
to my function?
I've tried repr() but that isn't it (I suspected it wouldn't be).
I suppose I'm looking for the equivelant of Java's toString() method...
thanks
Alex Hunsley wrote:
Pretty simple seeming question, but can't find answer via google or docs...
I am using urllib2 as follows:
handle = urlopen(req, postdata) # and URL to return a handle on
...
print handle.info()
the print statement prints out the headers:
Content-Type: text
prepared to remove the current 'recursion limit' AND offer tail-call
optimization possibilities, at the very least.
All in all, I fail to see what gains would be expected by making Python
into a single-assignment or single-binding language, even on a module by
module basis, to repay this kind of awkwardness.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Python's
runtime in Python, type inferencing on a somewhat restricted ("not too
dynamic/meta at runtime") subset of Python plays a key role there.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
about a certain subject, or just look up something
specific. Trying to make a book that's both a hand-holding tutorial
_and_ a quick reference would produce a book that is not very good at
either task, IMHO.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
at fancy/clever:
for val in (x for x in lst if x is not None):
return val
return None
Alex
--
http://mail.python.org/mailman/listinfo/python-list
To reiterate
the latter, and dress it up nicely too, it's
class wrapwell(object):
def __init__(self, somedict):
self.__dict__ = somedict
and use d=wrapwell(whateverdict) to make the wrapper. Now, reading or
writing d.x is just like reading or writing whateverdict['x&
it__(self, data):
self.__dict__ = data
Alex
--
http://mail.python.org/mailman/listinfo/python-list
yield item
lastitem = item
that's basically just the same as your code but without the strangeness
of making an enumerate for the purpose of ignoring what the enumerate
adds to an ordinary iterator.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
python-dev, I've even IM'd a couple of
Python-guru friends, but the friends are equally stumped and I'm getting
no answers on python-dev nor from the submitter of the bug report. So,
I thought I'd turn to the collective ingenuity of comp.lang.python...
thanks in advance for an
ct_to_wrap
and there you are.
Affecting *BARE* names is a completely different order of magnitude of
complication away from affecting *COMPOUND* names. Barenames are,
almost inevitably, handled with deep magic, essentially for the purposes
of can't-do-without optimization; compound names are _way_ more
malleable...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
max(lst)
This fails when lst is empty (the specs presumably imply a None should
be returned then). More robust:
return max(lst or [None])
Alex
--
http://mail.python.org/mailman/listinfo/python-list
Alexander Zatvornitskiy
<[EMAIL PROTECTED]> wrote:
> Hi, Alex!
>
> 31 jan 2005 at 13:46, Alex Martelli wrote:
>
> (sorry for the delay,my mail client don't highlight me your answer)
>
> AM> Since the lack of declarations is such a crucial design choice
Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Alex Martelli wrote:
>
> > Can anybody suggest where to find (within the standard library) or how
> > to easily make (e.g. in a C extension) a type without a __mro__, except
^
only one, for sure -- there must have been a dozen before you, at
least. Fortunately, even though almost each and every one of them has
wasted more of everybody's time with such ideas, than even their
scare-tactics claim of ``wastes of time'' due to lack of declaratio
Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Alex Martelli wrote:
> > 'global' is an ugly wart, to all intents and purposes working "as if" it
> > was a declaration. If I had to vote about the one worst formal defect
> > of Python, it would surely be
Arthur <[EMAIL PROTECTED]> wrote:
> On Sat, 5 Feb 2005 17:00:15 +0100, [EMAIL PROTECTED] (Alex Martelli)
> wrote:
> >
> >I consider this one of the worst ideas to have been proposed on this
> >newsgroup over the years, which _IS_ saying something. \
>
> I wo
aceback (most recent call last):
File "", line 1, in ?
AttributeError: 'xrange' object has no attribute 'next'
>>>
No next method -> not an iterator. iter(xrange(...)) DOES return an
iterator, btw.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
o
NOT let a type override what this one augmented assignment means; that
looks like an "attractive nuisance" tempting people to be too clever.
Still, if you write a PEP, I would mention the possible alternative and
why it's being rejected in favor of this simpler one.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ntrance into stupid firms broadens
its potential appeal from less than 10% to around 100% of the market,
which is good news for sellers of books, tools, training, consultancy
services, and for Python programmers everywhere -- more demand always
helps. *BUT* the price is eternal vigilance...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
attribute__(attr)
>
> class D(object):
> __metaclass__ = C
Yay -- *exactly*!!! This simple trick reproduces the problem AND shows
that using inspect.getmro fixes it. EXACTLY what we needed. Thanks!!!
Now I can make a proper patch with unittest as well as the fix.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
as C++
overloaded constructors, which you seem to like. If you want to do this
all the time, you could even build appropriate infrastructure for this
task -- a little custom descriptor and metaclass, and/or decorators.
Such infrastructure building is in fact fun and instructive -- as long
as you
er multiple-times", I like
"re-iterable"; it centers on what you can DO with the object, rather
than quibbling what it ISN'T;-)
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ble in unmoderated groups.
Shunning, or pelting the troll with abuse whenever he shows up, etc,
etc, sure. But, banning?
Alex
--
http://mail.python.org/mailman/listinfo/python-list
the secrecy IS critical for that part.
If you're currently distributing that ``secrecy critical'' code as JVM
bytecodes or intel machine code, and there IS indeed a profit to be made
in cracking it, rest assured that it IS cracked, somewhere.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
]
while stack:
rightmost = stack.pop()
if is_leaf(rightmost):
yield rightmost
else:
stack.extend(rightmost.all_children())
This isn't the traversing you're looking for, but it is _a_ traversing
of a recursive data type, non-recursive, an
Xah Lee wrote:
>
> well yes... but this was emulation of Mathematica functions.
> (Disclaimer: Mathematica is a trademark of Wolfram Research Inc, who is
> not affliated with this project)
You could have fooled me.
--
http://mail.python.org/mailman/listinfo/python-list
Is SYS V shared memory a totalyl stupid way of doing distributed locks
between processes then?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Jonathan Ellis
Sent: 06 July 2005 05:45
To: [email protected]
Subject: Re: threads and sleep?
Peter Hansen wr
or
len(align)!=len(fields):
raise 'Argument mismatch'
str = ''
while measure()!=0:
str += cutbits()
What's causing the error?
Thanks,
Alex
--
ChapterZero: http://tangentspace.net/cz/
--
http://mail.python.org/mailman/listinfo/python-list
I would like my program to accept a list of range values on the
command line, like
-a 1
-a 1-10
-a 4,5,2
In the interest of avoiding reinventing the wheel, is there already
available code for a callback that would enable optparse to parse
these as arguments?
Thanks,
Alex
--
ChapterZero: http
Recently I tried to slice every element of a list of strings. First I tried:
f = open("export.xls", "r")
lines = f.readlines()
for line in lines:
line = line[1:-5]
line = line.split('\"\t\"')
This went without returning any errors, but nothing was sliced or
split. Next I tried:
for i in
hi all
when i use Session object to save a object and then i use
util.redirect(req,url) to redirect a .psp.But in my psp i cann't load
session so i cann't get object from session,help me,thanks
here is my code
.py
s=Session.Session(req)
s["cur_user"]=user
s.set_timeout(1
...so we'd better be careful (==eternal vigilance)...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
; salaries are at the top has been true since the
first such poll -- not a huge difference, but statistically significant.
What this finding _means_ is, of course, somewhat of a mystery
(correlation isn't causation), as is, of course, the OP's less formal
observation about job postings.
Alex
--
http://mail.python.org/mailman/listinfo/python-list
pletely
separate it from the idea of having set b.foo as an attribute of class
A. Just try calling b.foo() without arguments and you'll get exactly
the same error message -- from the underlying function foo, which is
also b.foo.im_func (the function's FIRST argument is bound to
b.foo.im_self, which is b; whence the error being about function foo
taking exactly two arguments and only one having been given).
Alex
--
http://mail.python.org/mailman/listinfo/python-list
ness in
getDict and setDict -- structuring THEM as Template Methods, too -- to
fully support such a subclass; but that's a well-known general issue
with property, and the cost of the extra indirection -- mostly in terms
of complication -- should probably not be borne here, it seems to me]]
Alex
--
http://mail.python.org/mailman/listinfo/python-list
601 - 700 of 2602 matches
Mail list logo