[EMAIL PROTECTED] napisał(a):
So, while I often use Python's lambdas, the imposed limitations is ok
to me since I wouldn't use it for anything more complex.
Also - as a side note - while the syntax is a bit different, the
resulting object is an ordinary function.
And people start asking
Gabriel Genellina napisał(a):
Yes. Funciton is always a piece of code (program) that does something.
There is
no need for different syntax.
Guido has regretted lambda for a long time; it was scheduled for
deletion on Python 3000 [2] but finally will stay [3].
Thanks for that info and
And I say syntax should be the same. These are only opinions, so
forgive me for wasting your time.
You mean like in JS?
function foo(args) {}
foo = function(args) {}
Somehow the JS-designers also made a compromise to allow to create
unnamed and named functions. Could it be that it make
sam a écrit :
[EMAIL PROTECTED] napisał(a):
So, while I often use Python's lambdas, the imposed limitations is ok
to me since I wouldn't use it for anything more complex.
Also - as a side note - while the syntax is a bit different, the
resulting object is an ordinary function.
And
On 3 avr, 10:32, sam [EMAIL PROTECTED] wrote:
Bruno Desthuilliers napisa³(a):
Ok, I'm going to be a bit harsh, but this time I'll assume it.
Sam, you started this thread by asking about prototype vs class based
minor syntactic points that, whether you like them or not (and
I think I will
sam a écrit :
Bruno Desthuilliers napisał(a):
Ok, I'm going to be a bit harsh, but this time I'll assume it.
Sam, you started this thread by asking about prototype vs class based
minor syntactic points that, whether you like them or not (and
I think I will get back to this discussion
Bruno Desthuilliers napisał(a):
Ok, I'm going to be a bit harsh, but this time I'll assume it.
Sam, you started this thread by asking about prototype vs class based
minor syntactic points that, whether you like them or not (and
I think I will get back to this discussion after learning
On Thu, 03 Apr 2008 10:07:38 +0200, sam wrote:
[EMAIL PROTECTED] napisał(a):
So, while I often use Python's lambdas, the imposed limitations is ok
to me since I wouldn't use it for anything more complex.
Also - as a side note - while the syntax is a bit different, the
resulting object
En Thu, 03 Apr 2008 05:20:48 -0300, sam [EMAIL PROTECTED] escribió:
Gabriel Genellina napisał(a):
Class methods and instance methods are not just standard functions;
instance methods were plain functions before 2.2 and the Class object
was in charge of doing the self magic. Now the
On Wed, 2008-04-02 at 21:03 -0700, [EMAIL PROTECTED] wrote:
On Apr 2, 5:41 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
On 2 avr, 22:23, Paul Rubin http://[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] [EMAIL PROTECTED] writes:
Fine. But totally irrelevant here - this is
Bruno Desthuilliers napisał(a):
Sam, seriously, why don't start with *learning* about Python's object
model ? Seriously ? Not that it's perfect, not that you have to like
it
Ok -- thank you for your time and your strong opinions about current solutions.
--
Gabriel Genellina napisał(a):
1. You have different syntax for named and unnamed (lambdas)
functions. Functions and methods are different things in Python even
if they have same syntax. But all these are still a pieces of code
that you use repeatedly to make some task.
A knife and scissors
sam a écrit :
Bruno Desthuilliers napisał(a):
Sam, seriously, why don't start with *learning* about Python's object
model ? Seriously ? Not that it's perfect, not that you have to like it
Ok -- thank you for your time and your strong opinions about current
solutions.
Don't
Bruno Desthuilliers napisał(a):
Don't misunderstand me : I'm not saying that class-based is better (or
worse) than prototype, I'm not saying that Python is perfect, I'm not
saying that your points are not worth any consideration, I'm just saying
that, from your arguments, I have the very
On Apr 2, 10:52 am, sam [EMAIL PROTECTED] wrote:
Then I say:
-- __id is awful, because it is a trick to prefix names
and gurus say:
-- it is good solution for name conflicts
But somebody may prefix his names with class names and cause nameconflict, so
maybe it is not so
On 2 avr, 16:52, sam [EMAIL PROTECTED] wrote:
Bruno Desthuilliers napisał(a):
Don't misunderstand me : I'm not saying that class-based is better (or
worse) than prototype, I'm not saying that Python is perfect, I'm not
saying that your points are not worth any consideration, I'm just
[EMAIL PROTECTED] [EMAIL PROTECTED] writes:
Here the problem is more philosophical than anything else. Python's
philosophy is that most programmers are responsible and normally
intelligent, so treating them all like retarted dummies because
someone might one day do something stupid is just
On 2 avr, 20:46, Paul Rubin http://[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] [EMAIL PROTECTED] writes:
Here the problem is more philosophical than anything else. Python's
philosophy is that most programmers are responsible and normally
intelligent, so treating them all like retarted
[EMAIL PROTECTED] [EMAIL PROTECTED] writes:
Fine. But totally irrelevant here - this is comp.lang.python, not
comp.lang.c, and we *do not* (I repeat : we *do not*) face the same
safety and security problems as those existing in C.
We have it better than they do in some ways. In some other
En Wed, 02 Apr 2008 09:23:21 -0300, sam [EMAIL PROTECTED] escribió:
Gabriel Genellina napisał(a):
1. You have different syntax for named and unnamed (lambdas)
functions. Functions and methods are different things in Python even
if they have same syntax. But all these are still a pieces of
On 2 avr, 22:23, Paul Rubin http://[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] [EMAIL PROTECTED] writes:
Fine. But totally irrelevant here - this is comp.lang.python, not
comp.lang.c, and we *do not* (I repeat : we *do not*) face the same
safety and security problems as those existing in C.
On Apr 2, 5:41 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
On 2 avr, 22:23, Paul Rubin http://[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] [EMAIL PROTECTED] writes:
Fine. But totally irrelevant here - this is comp.lang.python, not
comp.lang.c, and we *do not* (I repeat : we *do not*)
sam a écrit :
Steven D'Aprano napisał(a):
I can see that Python and Javascript inheritance model is almost the
same. Both languages are dynamically typed. And it seems that using
classes in Python makes some things more complicated then it is
necessary (eg functions, methods and lambdas are
Diez B. Roggisch napisał(a):
no inheritance model in Javascript. Or why does each JS-lib provide
it's own version of an extend-function [1]?
Ok -- thank you!
The only point you might have is the somwhat unfortunate distinction
between lambda and function in python - but this is on a
Steven D'Aprano napisał(a):
I can see that Python and Javascript inheritance model is almost the
same. Both languages are dynamically typed. And it seems that using
classes in Python makes some things more complicated then it is
necessary (eg functions, methods and lambdas are differen beeing
sam wrote:
Steven D'Aprano napisał(a):
I can see that Python and Javascript inheritance model is almost the
same. Both languages are dynamically typed. And it seems that using
classes in Python makes some things more complicated then it is
necessary (eg functions, methods and lambdas are
Steve Holden napisał(a):
1. You have different syntax for named and unnamed (lambdas)
functions. Functions and methods are different things in Python even
if they have same syntax. But all these are still a pieces of code
that you use repeatedly to make some task.
A knife and scissors
En Mon, 31 Mar 2008 07:59:13 -0300, sam [EMAIL PROTECTED] escribió:
Steve Holden napisał(a):
1. You have different syntax for named and unnamed (lambdas)
functions. Functions and methods are different things in Python even
if they have same syntax. But all these are still a pieces of code
On Mar 26, 3:14 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Wed, 26 Mar 2008 02:03:24 -0300, Gabriel Genellina
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
No:http://en.wikipedia.org/wiki/Saruman
Ask him any time over.
--
sam a écrit :
Bruno Desthuilliers napisał(a):
In dynamically typed language when you create object A that is
inherited from another object B, than object A knows that B is his
predecessor. So
when you reference A.prop, then prop is looked in A first, then in B,
then in predecessors of
John Machin wrote:
On Mar 23, 12:32 am, Diez B. Roggisch [EMAIL PROTECTED] wrote:
John Machin schrieb:
On Mar 21, 11:48 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
[1] Just one example:http://docs.mootools.net/Class/Class.js
Mootools being something a coworker might use?
I don't
On Mar 25, 11:24 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Wed, 26 Mar 2008 06:49:57 +0800, Delaney, Timothy (Tim)
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
As an aside, having lived much of my early life on a hobby farm, I've
often wondered to myself just
En Wed, 26 Mar 2008 01:27:15 -0300, [EMAIL PROTECTED] escribió:
On Mar 25, 11:24 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Wed, 26 Mar 2008 06:49:57 +0800, Delaney, Timothy (Tim)
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
As an aside, having lived much of my early
John Machin schrieb:
On Mar 21, 11:48 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
[1] Just one example:http://docs.mootools.net/Class/Class.js
Mootools being something a coworker might use?
I don't understand the question.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 23, 12:32 am, Diez B. Roggisch [EMAIL PROTECTED] wrote:
John Machin schrieb:
On Mar 21, 11:48 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
[1] Just one example:http://docs.mootools.net/Class/Class.js
Mootools being something a coworker might use?
I don't understand the
sam a écrit :
Bruno Desthuilliers napisał(a):
Most of the arguments in favor of prototypes seems to come to, mainly:
1/ it lets you customize behaviour on a per-object base
2/ it removes the mental overhead of inheritance, classes etc
Point 1. is a non-problem in Python, since you can
Bruno Desthuilliers napisał(a):
In dynamically typed language when you create object A that is
inherited from another object B, than object A knows that B is his
predecessor. So
when you reference A.prop, then prop is looked in A first, then in B,
then in predecessors of B, and so on.
On Fri, 21 Mar 2008 11:43:33 +0100, sam wrote:
I can see that Python and Javascript inheritance model is almost the
same. Both languages are dynamically typed. And it seems that using
classes in Python makes some things more complicated then it is
necessary (eg functions, methods and lambdas
I can see that Python and Javascript inheritance model is almost the
same. Both languages are dynamically typed. And it seems that using
classes in Python makes some things more complicated then it is
necessary (eg functions, methods and lambdas are differen beeing in
Python concept).
On Mar 21, 11:48 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
[1] Just one example:http://docs.mootools.net/Class/Class.js
Mootools being something a coworker might use?
--
http://mail.python.org/mailman/listinfo/python-list
sam a écrit :
Some time ago (2004) there were talks about prototype-based languages
and Prothon emerged.
Can someone tell me why class-based OO is better that Prototype based,
For which definition of better ?-)
especially in scripting langage with dynamic types as Python is?
Here
Bruno Desthuilliers napisał(a):
Most of the arguments in favor of prototypes seems to come to, mainly:
1/ it lets you customize behaviour on a per-object base
2/ it removes the mental overhead of inheritance, classes etc
Point 1. is a non-problem in Python, since you can already add/replace
Some time ago (2004) there were talks about prototype-based languages and
Prothon emerged.
Can someone tell me why class-based OO is better that Prototype based,
especially in scripting langage with dynamic types as Python is?
Here are some links:
On Wed, 19 Mar 2008 17:59:40 +0100, sam wrote:
Can someone tell me why class-based OO is better that Prototype based,
especially in scripting langage with dynamic types as Python is?
Is it better!?
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list
44 matches
Mail list logo