New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: Not just OO style but this is not mentioned on python.org or in FAQ #69102
Comments
It states that they could have had an officially supported version of Python on that IBM platform much earlier but for this:
They may have used it earlier had they known then that Python can be written in a procedural style they having no love of Java's OO, but being able to use PHP and access PHP's OO bits. Looking again on python.org, the examples are not OO, but when you delve down, say to the FAQ - it gives the mistaken impression that OO is the _only_ style of programming supported: https://docs.python.org/2/faq/general.html#what-is-python Somehow we need to explain that OO is an implementation style, but the language allows code to be written in just as much - or as little, of proceedural/OO/functional styles as the programmer is comfortable with. |
The problem is that technically Python is an object-oriented language as everything is a language (which is what makes Python more OO than Java). Having said that, you can use other programming styles. I'm fine with clarifying the entry in the FAQ that Python can be written in other programming styles such as procedural or functional. If you have suggested wording, Paddy, please feel free to propose a patch. |
OK, here's a suggested re-wording: "Python is an interpreted, interactive, object-oriented programming language that also supports programming in procedural and functional styles. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes; but statements are not required to be contained in class definitions and functions are first class - being able to be composed, returned from other functions and be a member of other container types such as dicts, sets, and lists." If that is too long,an alternative would be to delete my addition to the last sentence from "; but classes are not ..." Leaving it to the reader to research just how procedural and functional Python can be. (Where should a programmer, but newbie-to-Python look)? |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: