Transcript and Dot Notation
Thomas McGrath III
3mcgrath at adelphia.net
Sun Feb 26 08:38:13 EST 2006
classMyObject:
def __init__ (self):
self.initialize()
def initialize(self):
self._value=None
def _setProperty (self, name, value):
print "set property"
setattr (self, name, value)
def _getProperty (self, name):
print "get property"
return getattr (self, name)
#properties
value = property (lambda self: self._getProperty("_value"),
lambda self, value: self._setProperty("_value",
value))
Tom
On Feb 25, 2006, at 11:26 PM, Mikey wrote:
> Dot-syntax blows. xTalk doesn't.
>
> datetime.now.asString
> Come on.
>
Thomas J McGrath III
3mcgrath at adelphia.net
Lazy River Software™ - http://www.lazyriversoftware.com
Lazy River Metal Art™ - http://www.lazyriversoftware.com/metal.html
Meeting Wear™ - http://www.cafepress.com/meetingwear
Semantic Compaction Systems - http://www.minspeak.com
SCIconics, LLC - http://www.sciconics.com/sciindex.html
More information about the use-livecode
mailing list