impossible in Python. What you wrote is OK, but I still don't know
where I have been wrong, unless you over-interpret my words. Sure, I didn't
want to claim that the assignment a=anything can be plainly overloaded. But
getitem, setitem, getattr, setattr - yes. And they (set-) are also assignments.
Jerzy Karczmarczuk
--
http://mail.python.org/mailman/listinfo/python-list
d assignments,
which btw. *can* be overloaded, but the absence of *aliasing* (undiscriminate
handling of pointers) in Python. Am I wrong?
Jerzy Karczmarczuk
--
http://mail.python.org/mailman/listinfo/python-list
in growing
> cannabis in your backyard, or selling pornography to teenagers, or driving
> without a licence.
>
> Possession of banned books is a crime in many countries, [enough ...]
Now, tell me: is the polluting of a newsgroup with off-topic postings,
a crime, and if yes then
nsgroup principles, such as
topicality. One to ten irrelevant postings do no harm. More than hundred -
become annoying. Cross-posting to 5 groups is bad. Please go away.
Claiming that this is an interesting, "great" thread is utterly silly in this
context. Shall Python newsgroup discuss the t
stant time (unless
the whole stuff is copied, which again makes the complexity related to the size
of existing structure...)
It is probably possible to retrieve this information from the sources, but I try
first an easier way.
Thank you.
Jerzy Karczmarczuk
--
http://mail.python.org/mailman/lis
azy
programming*, I implement some co-recursive algorithms with them.
So i use next() when I wish, and never 'for'.
Thank you once more.
Jerzy Karczmarczuk
--
http://mail.python.org/mailman/listinfo/python-list
;t get executed either. *EVERYTHING*
from the beginning until the yield gets executed only upon s.next().
Could you tell me please where can I read something in depth about the
semantics of generators? I feel a bit lost.
Thank you.
Jerzy Karczmarczuk
--
http://mail.python.org/mailman/listinfo/python-list
mouths fake arguments, just to
have something to argue about, OK?
FP appeals to many. Well, *why* people who jump into Python from other
languages very often like functional constructs, and dislike the fact
that destructive methods return nothing?...
Jerzy Karczmarczuk
--
http://mail.python.org/mailman/listinfo/python-list
ck the choice points in recursive generators.
In Python not so.
Hm.
Now I began to scratch my head. I will have to translate some Prolog
algorithms to Python generators...
Jerzy Karczmarczuk
--
http://mail.python.org/mailman/listinfo/python-list
avoid that, and leave those
nasty things to the compiler. That's all. Your final conclusion is for me
rather inacceptable. It is not the machine code which matters, but
human effort [provided you spent sufficient time to be fluent in *good*
recursive programming of complex tasks.]
Jerzy Karczmarczuk
--
http://mail.python.org/mailman/listinfo/python-list
fibdic[n]
And here the recursion limit won't get you!!
But the memoization techniques are rarely taught nowadays...
=
And the story doesn't end here. There are backtracking solutions, which
in functional (lazy) languages can be emulated through co-recursion, and
in Python by the use of generators.
Jerzy Karczmarczuk
--
http://mail.python.org/mailman/listinfo/python-list
(a,b)=fibo(n-1)
return (b,a+b)
The exponential complexity, cascading version is a nice test case how to
use memoization, though, so it is not entirely senseless to learn it.
Jerzy Karczmarczuk
--
http://mail.python.org/mailman/listinfo/python-list
similar. I didn't try other methods, but
I suspect that it won't improve.
WHY?
It seems that there was already some discussion about consistency and
somebody produced the example: h = {}.update(l) which didn't work,
but I wasn't subscribed to this nsgr, I couldn't f
13 matches
Mail list logo