On 9 October 2015 at 17:26, John Michael Lafayette
<johnmichaelreed...@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
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to