I have this python code
class Car:
"""Type of car."""
manufacturer = f.string()
model = f.string()
modelYear = f.integer()
_key(manufacturer, model, modelYear)
def __str__(self):
return '%s %s %s' % (self.modelYear, self.manufacturer, self.model)
-
and would like to see it e.g. this way:
class Car:
"""Type of car."""
manufacturer = f.string(true, str=2)
model = f.string(true, str=3)
modelYear = f.integer(true, str=1)
-
how would the factory method look like?
def string(self, key, str )
# create somehow the __str__ function
# create somehow the key
.
--
http://lazaridis.com
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor