Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.linux.misc    |    Linux-specific topics not covered by oth    |    135,536 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 133,729 of 135,536    |
|    Lawrence =?iso-8859-13?q?D=FFOlivei to Richard Kettlewell    |
|    Re: Python (was Re: Recent history of vi    |
|    20 Dec 25 22:28:19    |
      XPost: alt.folklore.computers, comp.lang.python       From: ldo@nz.invalid              On Sat, 20 Dec 2025 10:12:49 +0000, Richard Kettlewell wrote:              > Another property suggested in [1] for ‘strong typing’ is that       > functions can only be called with with arguments matching a declared       > type. In Python, function arguments do not have declared types[2]       > and does not even infer them; anything goes. You will only hit an       > exception if you try to use the arguments in the wrong way.              Python calls this “duck typing”. The called code expects the passed       objects to have certain members; so long as they have those, they can       be of any type. E.g. a function might be written to write to an output       file object, but anything passed that has a suitable “.write()” method       on it will work.              In other words, if it looks like a duck and quacks like a duck, then       it is acceptable in place of a duck.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca