This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author John Michael Lafayette
Recipients John Michael Lafayette
Date 2015-10-09.06:08:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1444370887.78.0.708610207347.issue25350@psf.upfronthosting.co.za>
In-reply-to
Content
With a lot of languages, I can tell
that the type I am getting is an instance of the declared type I'm assigning it to.

Example:
Cat c = Factory.make("cat"
Animal d = Factory.make("dog")

Python:
val c = Factory.make("cat")

Problem with this is that it is not necessarily obvious to the reader what the type of c is. I suggest that you provide an option to strengthen python's type checking by allowing users to replace val with the expected type of the object and then allow the interpreter to check that the real type being assigned is an instance of the expected type. An option like -strong for strong typing.
History
Date User Action Args
2015-10-09 06:08:07John Michael Lafayettesetrecipients: + John Michael Lafayette
2015-10-09 06:08:07John Michael Lafayettesetmessageid: <1444370887.78.0.708610207347.issue25350@psf.upfronthosting.co.za>
2015-10-09 06:08:07John Michael Lafayettelinkissue25350 messages
2015-10-09 06:08:07John Michael Lafayettecreate