Ondrej Certik wrote:
Which works in CPython but fails in CLPython. From your answer it seems to me that this code is not nice and we should not use it and should rather use something like:class Basic(AssumeMeths): ... for k in AssumeMeths._assume_defined: setattr(Basic, 'is_%s' % k, property(make__get_assumption('Basic', '%s' % k))) which should work on all platforms. What do you think?
That is what setattr is for. Many consider exec a last resort. I think any further discussion should move to the general python list or c.l.p since this is not a develop-core-python issue.
_______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
