Jump to content

Abstract type: Difference between revisions

Line 109:
In Genyris by default there are no constructors. In effect all classes are Abstract until they are used to tag an object.
<lang python>class Stack()</lang>
There is no constructor for thethis class. However toTo prevent the class ever being associated with an instance it suffices to force the validator to fail.
<lang python>class Stack()
def !valid?(object) nil
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.