On Wednesday 16 April 2008 09:13:56 am Paul McNett wrote:
> johnf wrote:
> > On Wednesday 16 April 2008 09:01:00 am Paul McNett wrote:
> >> + Add return type information to the VirtualFields dict:
> >> self.VirtualFields = {"number_panels": (self.get_number_panels, int)}
> >
> > That would work for me. But is it very pythonic?
>
> What do you mean? It is a python tuple in a python dict.
>
> In the future we could decorate our virtual field functions with return
> type information, but I actually don't see how that would be cleaner
> than specifying it in the VirtualFields dict to begin with.
>
> Paul
When I think of python I think of a language that handles all data in a
dynamic way.
x= 0
x='A'
x='B'
Your solution requires that the function return a static data type. In your
example it returns an 'int'. It just makes me think of the languages that
require static typing. BTW you do realize that recent changes are the cause
of the error appearing. I have not changed the code in well over a month -
and all was working a month ago.
--
John Fabiani
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]