Eike Welk a écrit : > John Posner wrote: >> I've updated the text at this location: >> >> > http://cl1p.net/bruno_0301.rst/ > > I think this is a very useful writeup! > > It would be perfect with a little bit of introduction that says: > 1. - What it is: "The rough details of method look-up"; > 2. - which contains some of the questions that that made that authors write > the text. This way people with similar questions can find it with Google. > John, do you think you could something with the following ? """ "Is it a function ? is it a method ? No, it's... " - or : What's in a Python method ? Python newcomers often have hard time understanding the "magic" behind Python's methods - and truth is that Python's object model can be a bit peculiar when compared to most mainstream (or not-so-mainstream) OOPLs. As a matter of fact, there are quite a few threads on c.l.py with either direct or indirect questions about what makes a Python method, and I must have explained the whole mechanism at least 3 or 4 times there. The following text is an edited version of my last attempt, as edited, corrected and published by John Posner, MayHisNameBePraised(tm). This text isn't meant as a replacement for neither the official FineManual(tm)[XXX : relevant link] nor the very excellent - if somehow technical - 'Descriptors how-to' [XXX : relevant link]. It's mostly a brief but hopefully helpful overview of what exactly is a Python method, and how Python magically inserts the 'self' or 'cls' argument to method calls. """ Feel free to edit / amend / rewrite / trash at will - you're now officially in charge of publishing this text !-)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4