> Well, I considered encapsulation as syntactical sugar.
> And even prolog knows polymorphism, but I wouldn't call it OOP.
Humor acknowledged, but...
Encapsulation can be syntactic sugar - and often is.
But the concept that it sugar coats is real enough.
You can write OOP by convention using lang
Well, I considered encapsulation as syntactical sugar.
And even prolog knows polymorphism, but I wouldn't call it OOP. (Yes, I
know in a typless context polymorphism doesn't mean too much. And btw,
if Python is a multi-paradigm language why doesn't support polygamy? :) )
Or maybe I'm wrong ...
I just found this message (because Mike posted the tinyurl)
and couldn't resist responding...
"Zsiros Levente" <[EMAIL PROTECTED]> wrote
> If we're talking about data hiding, let me ask: why Python doesn't
> implement data hiding (I mean 'private' and 'protected')? I consider
> it
> a very im
Yep...across multiple lines.
Here's a tinyurl of it
http://tinyurl.com/n93au
Mike
> -Original Message-
> From: Zsiros Levente [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 25, 2006 11:37 PM
> To: Mike Hansen
> Cc: python tutor
> Subject: Re: [Tutor] tkinter
So, in the following line
self.can.bind("",lambda x:self.handler(x,'release'))
the event-handler will call handler(event, 'release') when the
mousebutton is released, but the 'self' reference is automatically
passed over, so the result will be the handler(self,event, 'release') call.
Correct m
So, in the following line
self.can.bind("",lambda x:self.handler(x,'release'))
the event-handler will call handler(event, 'release') when the
mousebutton is released, but the 'self' reference is automatically
passed over, so the result will be the handler(self,event, 'release')
call.
Correct m
So, in the following line
self.can.bind("",lambda x:self.handler(x,'release'))
the event-handler will call handler(event, 'release') when the
mousebutton is released, but the 'self' reference is automatically
passed over, so the result will be the handler(self,event, 'release')
call.
Correct m
The link is broken.
Mike Hansen wrote:
>
>
>
>
>>-Original Message-
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] On Behalf Of Zsiros Levente
>>Sent: Thursday, August 24, 2006 2:21 PM
>>To: Danny Yoo
>>Cc: python tutor
>&
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Zsiros Levente
> Sent: Thursday, August 24, 2006 2:21 PM
> To: Danny Yoo
> Cc: python tutor
> Subject: Re: [Tutor] tkinter events:
>
> If we're talking about dat
If we're talking about data hiding, let me ask: why Python doesn't
implement data hiding (I mean 'private' and 'protected')? I consider it
a very important OOP feature, because that makes OOP different from
structural programming.
Danny Yoo wrote:
>> def handler(event):
>> if buttonpressed
> def handler(event):
> if buttonpressed == 1 :
> /#if the mousebutton is pressed and moved, circles should
> appear, but they do not/
> can.create_oval(event.x-r, event.y-r, event.x+r, event.y+r,
> fill="orange")
> lab.config(text='buttonpressed=' + str(bu
Zsiros Levente wrote:
>Luke Paireepinart wrote:
>
>
>
>>Zsiros Levente wrote:
>>
>>
>>
>>>[snip code]
>>>*def* handler(event):
>>>*if* buttonpressed == 1 :
>>>/#if the mousebutton is pressed and moved, circles should
>>>appear, but they do not/
>>>can.create_oval(event.x
You're right, that I pressed reply instead of reply-to-all, so the list
didn't see my response. But this way you got my mail twice. Isn't that
annoying? Other maillist servers used to use the reply-to tag in the
message header.
Luke Paireepinart wrote:
> Zsiros Levente wrote:
>
>> [snip code]
Luke Paireepinart wrote:
> Zsiros Levente wrote:
>
>> [snip code]
>> *def* handler(event):
>> *if* buttonpressed == 1 :
>> /#if the mousebutton is pressed and moved, circles should
>> appear, but they do not/
>> can.create_oval(event.x-r, event.y-r, event.x+r, event.y+r,
>> f
Zsiros Levente wrote:
[snip code]
*def* handler(event):
*if* buttonpressed == 1 :
/#if the mousebutton is pressed and moved, circles should
appear, but they do not/
can.create_oval(event.x-r, event.y-r, event.x+r, event.y+r,
fill="orange")
lab.con
#!/usr/bin/python
# In this program I wanted to write the event on my own, combining , and ,
# but unfortunetly it doesn't work. No syntax errors.
from Tkinter import *
def handler(event):
if buttonpressed == 1 :
#if the mousebutton is pressed and moved, circles should appear, but
16 matches
Mail list logo