On Mon, Sep 19, 2011 at 06:32:50PM -0700, Ethan Jackson wrote:
> Does it make sense to add ref_table to BaseType's constructor with a
> default value of None.  Perhaps not since so little code cares about
> it.  Curious what you think.

I thought about it, but no existing code knows what should go there
at time of construction, except BaseType.copy().

If we get a second function that knows what to put there, I'd agree
with you.

> > ? ? def copy(self):
> > - ? ? ? ?return BaseType(self.type, self.enum.copy(), self.min, self.max,
> > - ? ? ? ? ? ? ? ? ? ? ? ?self.min_length, self.max_length, self.ref_table)
> > + ? ? ? ?base = BaseType(self.type, self.enum.copy(), self.min, self.max,
> > + ? ? ? ? ? ? ? ? ? ? ? ?self.min_length, self.max_length, 
> > self.ref_table_name)
> > + ? ? ? ?base.ref_table = self.ref_table
> 
> You need to return base.

Thanks.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to