Re: Addressing the last element of a list

2005-11-08 Thread Jerzy Karczmarczuk
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

Re: Addressing the last element of a list

2005-11-08 Thread Jerzy Karczmarczuk
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

Re: OT - Re: Microsoft Hatred FAQ

2005-11-03 Thread Jerzy Karczmarczuk
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

Re: Microsoft Hatred FAQ

2005-10-19 Thread Jerzy Karczmarczuk
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

Technical question on complexity.

2005-10-13 Thread Jerzy Karczmarczuk
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

Re: What is executed when in a generator

2005-10-04 Thread Jerzy Karczmarczuk
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

What is executed when in a generator

2005-10-04 Thread Jerzy Karczmarczuk
;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

Twist and perversion. Was: Software bugs aren't inevitable

2005-09-19 Thread Jerzy Karczmarczuk
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

Re: Software bugs aren't inevitable

2005-09-16 Thread Jerzy Karczmarczuk
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

Re: Software bugs aren't inevitable

2005-09-15 Thread Jerzy Karczmarczuk
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

Re: Software bugs aren't inevitable

2005-09-15 Thread Jerzy Karczmarczuk
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

Re: Software bugs aren't inevitable

2005-09-14 Thread Jerzy Karczmarczuk
(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

Inconsistent reaction to extend

2005-09-09 Thread Jerzy Karczmarczuk
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