learnpython.org - an online interactive Python tutorial
python at mrabarnett.plus.com
Thu Apr 21 12:13:06 EDT 2011
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<akabaila at 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
> 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.
More information about the Python-list