En Wed, 04 Nov 2009 04:50:42 -0300, Alf P. Steinbach al...@start.no
escribió:
* Gabriel Genellina:
I don't understand either. R1 and R2 have *different* semantics.
Assume that they have the very exact same semantics -- like two TV
sets that look the same and work the same except when
* Gabriel Genellina:
En Wed, 04 Nov 2009 04:50:42 -0300, Alf P. Steinbach al...@start.no
escribió:
* Gabriel Genellina:
I don't understand either. R1 and R2 have *different* semantics.
Assume that they have the very exact same semantics -- like two TV
sets that look the same and work
Alf P. Steinbach wrote:
However, the natural semantics is that various logical properties, such
as left, top, right, bottom, width and height, can be varied independently.
But they *CANNOT* be varied independently. A rectangle with side
parallel to the axes has exactly 4 degress of freedom,
* Terry Reedy:
Alf P. Steinbach wrote:
However, the natural semantics is that various logical properties,
such as left, top, right, bottom, width and height, can be varied
independently.
But they *CANNOT* be varied independently. A rectangle with side
parallel to the axes has exactly 4
On Wed, 04 Nov 2009 08:50:42 +0100, Alf P. Steinbach wrote:
* Gabriel Genellina:
I don't understand either. R1 and R2 have *different* semantics.
Assume that they have the very exact same semantics
Why would we assume that when you have explicitly told us that they don't?
You stated
* Steven D'Aprano:
On Wed, 04 Nov 2009 08:50:42 +0100, Alf P. Steinbach wrote:
* Gabriel Genellina:
I don't understand either. R1 and R2 have *different* semantics.
Assume that they have the very exact same semantics
Why would we assume that when you have explicitly told us that they
* Alf P. Steinbach:
* Steven D'Aprano:
On Wed, 04 Nov 2009 08:50:42 +0100, Alf P. Steinbach wrote:
* Gabriel Genellina:
I don't understand either. R1 and R2 have *different* semantics.
Assume that they have the very exact same semantics
Why would we assume that when you have explicitly
* Diez B. Roggisch:
Alf P. Steinbach schrieb:
* Diez B. Roggisch:
Your comment about computed makes it more clear what that's all
about.
Also Bertrand Meyer (Eiffel language creator) had idea like that, he
called it referential transparency. But I think when Python has this
nice property
On Wed, 04 Nov 2009 02:29:21 +0100, Alf P. Steinbach wrote:
For example, consider two rectangle classes R1 and R2, where R2 might
be a successor to R1, at some point in system evolution replacing R1.
R1 has logical data members left, top, width and height, and R2 has
logical data members
* Steven D'Aprano:
On Wed, 04 Nov 2009 02:29:21 +0100, Alf P. Steinbach wrote:
For example, consider two rectangle classes R1 and R2, where R2 might
be a successor to R1, at some point in system evolution replacing R1.
R1 has logical data members left, top, width and height, and R2 has
logical
En Wed, 04 Nov 2009 03:15:14 -0300, Alf P. Steinbach al...@start.no
escribió:
* Steven D'Aprano:
On Wed, 04 Nov 2009 02:29:21 +0100, Alf P. Steinbach wrote:
For example, consider two rectangle classes R1 and R2, where R2 might
be a successor to R1, at some point in system evolution replacing
Alf P. Steinbach wrote:
* Peter Otten:
* Alf P. Steinbach wrote:
* Peter Otten:
Every time someone has to read the code he will read, hesitate, read
again, and then hopefully come to the conclusion that the code does
nothing, consider not using it, or if it is not tied into a larger
* Gabriel Genellina:
I don't understand either. R1 and R2 have *different* semantics.
Assume that they have the very exact same semantics -- like two TV sets that
look the same and work the same except when you open 'em up and poke around in
there, oh holy cow, in this one there's stuff
Alf P. Steinbach wrote:
for x in range(0,3):
Button(.., command=lambda x=x: function(x))
An alternative reusable alternative is to create a button-with-id class.
This is my very first Python class so I'm guessing that there are all
sorts of issues, in particular naming
On Mon, Nov 2, 2009 at 2:26 AM, Peter Otten __pete...@web.de wrote:
Alf P. Steinbach wrote:
for x in range(0,3):
Button(.., command=lambda x=x: function(x))
An alternative reusable alternative is to create a button-with-id class.
This is my very first Python class so
* Peter Otten:
Alf P. Steinbach wrote:
for x in range(0,3):
Button(.., command=lambda x=x: function(x))
An alternative reusable alternative is to create a button-with-id class.
This is my very first Python class so I'm guessing that there are all
sorts of issues, in
Alf P. Steinbach wrote:
* Peter Otten:
Alf P. Steinbach wrote:
for x in range(0,3):
Button(.., command=lambda x=x: function(x))
An alternative reusable alternative is to create a button-with-id class.
This is my very first Python class so I'm guessing that there are all
Alf P. Steinbach wrote:
* Peter Otten:
Alf P. Steinbach wrote:
for x in range(0,3):
Button(.., command=lambda x=x: function(x))
An alternative reusable alternative is to create a button-with-id class.
This is my very first Python class so I'm guessing that there are all
* Peter Otten:
Alf P. Steinbach wrote:
* Peter Otten:
Alf P. Steinbach wrote:
for x in range(0,3):
Button(.., command=lambda x=x: function(x))
An alternative reusable alternative is to create a button-with-id class.
This is my very first Python class so I'm guessing that
* Diez B. Roggisch:
Alf P. Steinbach wrote:
* Peter Otten:
Alf P. Steinbach wrote:
for x in range(0,3):
Button(.., command=lambda x=x: function(x))
An alternative reusable alternative is to create a button-with-id class.
This is my very first Python class so I'm guessing
Alf P. Steinbach wrote:
* Peter Otten:
Alf P. Steinbach wrote:
* Peter Otten:
unidiomatic None-checks
What's the idiomatic Python way for an optional thing?
if some_value is None: ...
Thanks!
But why is this preferred?
I guess because `some_value == None` restricts your choices if
* Diez B. Roggisch:
Your comment about computed makes it more clear what that's all about.
Also Bertrand Meyer (Eiffel language creator) had idea like that, he
called it referential transparency. But I think when Python has this
nice property mechanism, why do people change direct data
Alf P. Steinbach wrote:
Your comment about computed makes it more clear what that's all about.
Also Bertrand Meyer (Eiffel language creator) had idea like that, he
called it referential transparency. But I think when Python has this
nice property mechanism, why do people change direct data
Alf P. Steinbach schrieb:
* Diez B. Roggisch:
Your comment about computed makes it more clear what that's all about.
Also Bertrand Meyer (Eiffel language creator) had idea like that, he
called it referential transparency. But I think when Python has this
nice property mechanism, why do people
* Peter Otten:
* Alf P. Steinbach wrote:
* Peter Otten:
Every time someone has to read the code he will read, hesitate, read
again, and then hopefully come to the conclusion that the code does
nothing, consider not using it, or if it is not tied into a larger
project removing it.
I don't
Hi
Maybe this is maybe something it has been answered somewhere but I haven't
been able to make it work. I wanna pass one variable to a callback function
and I've read the proper way is:
Button(.., command=lambda: function(x))
So with
def function(a): print a
I get the value of x. Ok.
Lord Eldritch wrote:
Hi
Maybe this is maybe something it has been answered somewhere but I haven't
been able to make it work. I wanna pass one variable to a callback function
and I've read the proper way is:
Button(.., command=lambda: function(x))
So with
def function(a): print a
I
Hi
Maybe this is maybe something it has been answered somewhere but I haven't
been able to make it work. I wanna pass one variable to a callback function
and I've read the proper way is:
Button(.., command=lambda: function(x))
So with
def function(a): print a
I get the value of x. Ok.
* MRAB:
Lord Eldritch wrote:
Hi
Maybe this is maybe something it has been answered somewhere but I
haven't been able to make it work. I wanna pass one variable to a
callback function and I've read the proper way is:
Button(.., command=lambda: function(x))
So with
def function(a):
Alf P. Steinbach wrote:
* MRAB:
Thank you all! It is working now nicely! God! I love usenet..:D
--
Lord Eldritch
--
http://mail.python.org/mailman/listinfo/python-list
30 matches
Mail list logo