On Thu, Apr 21, 2011 at 9:13 AM, MRAB <pyt...@mrabarnett.plus.com> wrote:
> On 21/04/2011 15:14, Westley Martínez wrote: > >> On Thu, Apr 21, 2011 at 05:19:29PM +1000, Chris Angelico wrote: >> >>> On Thu, Apr 21, 2011 at 5:10 PM, Algis Kabaila<akaba...@pcug.org.au> >>> wrote: >>> >>>> False: Python IS strongly typed, without doubt (though the >>>> variables are not explicitly declared.) >>>> >>> >>> Strongly duck-typed though. If I create a class that has all the right >>> members, it can simultaneously be a file, an iterable, a database, and >>> probably even a web browser if it feels like it. Is that strong typing >>> or not? >>> >>> Chris Angelico >>> -- >>> http://mail.python.org/mailman/listinfo/python-list >>> >> >> It's strong typing. Python does not implicitly convert types. Weak >> typing is >> when I can do 1 + "1" and get 2. >> > > It could be argued that it does implicit convert for some numeric > types, eg int to float when needed. Yes, it'll silently promote int to float, int to Decimal, and also almost anything can be used in a Boolean context. No other exceptions to strong typing come to mind...
-- http://mail.python.org/mailman/listinfo/python-list