Strong typing implementation for Python
Gregory Ewing
greg.ewing at canterbury.ac.nz
Sun Oct 11 18:43:02 EDT 2015
> On 9 October 2015 at 17:26, John Michael Lafayette
> <johnmichaelreedfas at gmail.com> wrote:
>
>>I would like Python to also be able to also do this:
>>
>> Animal a = Factory.make("dog") # okay. Dog is Animal.
>> Dog d = Factory.make("dog") # okay. Dog is Dog.
>> Cat c = Factory.make("cat") # Runtime error. Dog is not Cat.
You might like to investigate Boo, which is a .NET-based
language with a Python-like syntax:
--
Greg
More information about the Python-list
mailing list