Paolino wrote:
Is __hash__=id inside a class enough to use a set (sets.Set before 2.5)
derived class instance as a key to a mapping?
It is __hash__=lambda self:id(self) that is terribly slow ,it needs a
faster way to state that to let them be useful as key to mapping as all
set operations
I'm not sure I understood completely the idea but deriving freeze
function from hash gives hash a wider importance.
Is __hash__=id inside a class enough to use a set (sets.Set before 2.5)
derived class instance as a key to a mapping?
Sure I missed the point.
Regards Paolino
.
Paolino
___
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
)), iter=1)
f(1,[2,3],(_ for _ in (4,5)),iter=True)
Regards Paolino
___
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
makes
it a non compatible solution with the rest of yours.
writeln('def', (5, 6))
Regards Paolino
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman
Jack Diederich wrote:
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
Christos Georgiou wrote:
Paolino [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
What if I want to chain an infinite list of iterables?
Shouldn't itertools.chain be built to handle that?
Raymond already suggested a four-line function that does exactly that.
Create your
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 this signature ?
Regards paolino
Paolino wrote:
I noticed (via using them) that decorations are applied to methods
before they become methods.
This choice flattens down the implementation to no differentiating
methods from functions.
1)
I have to apply euristics on the wrapped function type when I use the
function
ends up in metamethods or something I can't grasp
Thanks
Paolino
___
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
for ever.
Or if there is a workaround, please tell me here because python-list
didn't help.
class H(set):
def __hash__(self):return id(self)
s=H()
f=set()
f.add(s)
f.remove(s) # this fails
Regards Paolino
___
Python-Dev mailing list
Python-Dev
Hello developers,I noticed my application was growing strangely while I
was using type, then I tried this:
while True:
type('A',(),{})
and saw memory filling up.Is there a clean solution to that?
I see it as a bug in python engeneering,that is why I wrote to you.
Thanks a lot
Paolino
Tim Peters wrote:
[Paolino [EMAIL PROTECTED]]
Hello developers,I noticed my application was growing strangely while I
was using type, then I tried this:
while True:
type('A',(),{})
and saw memory filling up.Is there a clean solution to that?
I see it as a bug in python engeneering
Tim Peters wrote:
[Paolino [EMAIL PROTECTED]]
Hello developers,I noticed my application was growing strangely while I
was using type, then I tried this:
while True:
type('A',(),{})
and saw memory filling up.Is there a clean solution to that?
I see it as a bug in python engeneering
14 matches
Mail list logo