[visionegg] Re: Proper use of ParameterTypes
- From: Andrew Straw <astraw@xxxxxxxxxxx>
- To: visionegg@xxxxxxxxxxxxx
- Date: Mon, 15 Aug 2005 07:38:36 -0700
Hi Simeon,
On Aug 15, 2005, at 5:56 AM, Simeon Fitch wrote:
I have two questions about the use of ParameterTypes with
ClassWithParameters:
1) What's the role of the *MC classes? Integer vs. IntegerMC, AnyClass
vs. AnyClassMC, etc.?
They're metaclasses... I can't remember why they were/are necessary. I
think it's safe for you to ignore them.
2) I have a subclass of ClassWithParameters where one of the
parameters needs to be of a specific class. I'm not sure which
ParameterTypes class I should use; AnyClass, or Instance, or SubClass.
From the reference documentation it's not clear to me how to properly
use these.
I've added some minimal docstrings: see
http://visionegg.org/cgi-bin/viewcvs.cgi/trunk/visionegg/src/
ParameterTypes.py?rev=1340&view=markup
I think in most cases you'd want Instance. AnyClass or SubClass should
be used if you want to use a class object as a parameter, not an
instance of that class.
Cheers!
Andrew
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
- Follow-Ups:
- [visionegg] Re: Proper use of ParameterTypes
- From: Simeon Fitch
- References:
- [visionegg] Proper use of ParameterTypes
- From: Simeon Fitch
Other related posts:
- » [visionegg] Proper use of ParameterTypes
- » [visionegg] Re: Proper use of ParameterTypes
- » [visionegg] Re: Proper use of ParameterTypes
- » [visionegg] Re: Proper use of ParameterTypes
1) What's the role of the *MC classes? Integer vs. IntegerMC, AnyClass vs. AnyClassMC, etc.?
2) I have a subclass of ClassWithParameters where one of the parameters needs to be of a specific class. I'm not sure which ParameterTypes class I should use; AnyClass, or Instance, or SubClass. From the reference documentation it's not clear to me how to properly use these.
====================================== The Vision Egg mailing list Archives: http://www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html
- [visionegg] Re: Proper use of ParameterTypes
- From: Simeon Fitch
- [visionegg] Proper use of ParameterTypes
- From: Simeon Fitch