Talk:Python (programming language)/Archive 8
![]() | This is an archive of past discussions about Python (programming language). Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 5 | Archive 6 | Archive 7 | Archive 8 | Archive 9 | Archive 10 | Archive 11 |
Indentation not significant?
Does anyone besides Strombrg think that Python's use of indentation isn't worth mentioning in the lede? I strongly disagree as it's one of the more unique, useful, and visually striking attributes of the language. --Cybercobra (talk) 05:44, 15 March 2010 (UTC)
- I don't consider it's use of indentation it's core/defining feature, so I also don't consider it significant enough for the lead. Section 4.1 on indentation could make more of a deal about it in comparison to other languages. peterl (talk) 05:55, 15 March 2010 (UTC)
- strombrg here: When Python is attacked, it's normally attacked for its whitespace for blocks. It's now one of the things I now love most about the language, but when I first saw it, I thought it was awful - as is the reaction of many others new to the language. Putting something this likely to discourage newcomers in the first paragraph is just asking for trouble. Yes, unusual != bad, but it's important to keep in mind that this perspective is "truer" in technical discussion, not marketing discussion, because it's very common for humans to mistake the descriptive for the normative. —Preceding unsigned comment added by Strombrg (talk • contribs) 00:41, 19 March 2010 (UTC)
I believe, with Cybercobra, and with the longstanding consensus of article editors, that mentioning Python's indentation block style should be mentioned in the lead. This feature is one of the most widely mentioned aspects of Python in other introductions and discussion of Python. While I entirely agree that the significance of this feature is often exaggerated–both pro and con–the fact it is so frequently mentioned in 3rd party sources makes it notable to readers of the article. LotLE×talk 03:01, 19 March 2010 (UTC)
- strombrg: No one's saying it shouldn't be mentioned, and in fact it is mentioned (again, as if once isn't enough) later in the article. I'm just saying it shouldn't be in a "you only get one first impression" spot where newcomers are more likely to be driven away by it - this in combination with the previous "claims to be powerful" stuff read like it was written by someone who hated the language. Please see http://www.se-radio.net/podcast/2006-02/episode-4-scripting-languages for a typical example of how whitespace for block scoping is misperceived outside the python community. —Preceding unsigned comment added by Strombrg (talk • contribs) 18:36, 20 March 2010 (UTC)
- I think the indentation is important enough to be mentioned in the lead. Ulner (talk) 21:37, 20 March 2010 (UTC)
- I think indentation makes Python "special". We could add the GvR's argument: you already use space/tabs to indent your code, why not make it part of the language (for better and for worst)? --0x6adb015 (talk) 12:28, 22 March 2010 (UTC)
No "mere" in scripting
I think the word mere should be dropped when describing scripting in the heading as it smacks of being (wrongly) ashamed of your parents. There is nothing "mere" about scripting. It is the essential glue that binds many a system and central to how things get done on Unix-like systems. Yes, it may be thought by some to be beneath other programming but Python practitioners should know better.
Drop the word! --Paddy (talk) 06:44, 15 March 2010 (UTC)
Example?
Wouldn't it be nice to have an example code? --JokerXtreme (talk) 11:35, 26 March 2010 (UTC)
- Yes, it would. Perhaps a classic 'Hello world'. 95.147.185.198 (talk) 19:20, 25 April 2010 (UTC)
- I've added a couple of simple examples that may help. We need to be careful not to add too much - Wikipedia is not a 'How To'. peterl (talk) 10:38, 27 April 2010 (UTC)
Improve "Mathematics' section
NumPy and SciPy definitely should be mentioned in the "Mathematics" section (currently they are mentioned in the "Usage" section only). For now there are some garbage about %, /, rounding floats to integers etc.
Dmitrey (talk) 12:37, 26 September 2010 (UTC)
Introduction
It could be valuable from a novice's point of view if the article mentioned that the software is free to download. 74.105.52.232 (talk) 18:56, 23 May 2010 (UTC)
Criticism
Can someone put a criticism section in? Python can't be totally free from criticism. --Volumebass112 (talk) 12:29, 23 June 2010 (UTC)
- The problem with such things is sourcing. When they've been done in the past, even highly regarded industry commentators have been removed as "not being WP:RS", because they were recognised as experts in Java, Ruby or Perl etc., but not Python. To be WP:RS for Python itself, one's assumed to have to be drinking the Kool-aid and thus unlikely to criticise it.
As one of Python's obvious targets for criticism would be dynamic typing itself, we'd first need a WP article that managed to get an accurate description of dynamic typing in Python, something we don't currently have. Andy Dingley (talk) 12:36, 23 June 2010 (UTC)
- To assume that one is favorably biased just because one has been using a product or service for a while is in and of itself being biased, and is no indicator whatsoever that the source is unreliable. There are products that I've been using for years with which I have a bone to pick, often because I've seen better 10 or 20 years ago and all that's available now is product "X" with numerous flaws and quirks. I'd be happy to accept a critical review any time under such conditions, especially if criticisms can be backed up with evidence. All too often I've found that experts on product "X" are blissfully unaware of shortcomings, because they've been working with "X" exclusively and don't realize that products "Y" and "Z" are much better. In such cases the criticisms of product "X" from experts on products "Y" and "Z" carry more weight.
The very style and content of the article as it now stands illustrates my point. I visited it several months ago to find out what Python was all about and came away just as ignorant as when I started. The article gets bogged down in minutiae from the very first sentence in the lead section and didn't even tell me if Python was run on an interpreter or a compiler. It just got worse from there. That's what you get when something is written by "recognised experts" or copied from the writings of such "experts". (I added a few words in the lead section earlier today in an attempt to alleviate this criticism.)—QuicksilverT @ 05:02, 29 October 2010 (UTC)
- To assume that one is favorably biased just because one has been using a product or service for a while is in and of itself being biased, and is no indicator whatsoever that the source is unreliable. There are products that I've been using for years with which I have a bone to pick, often because I've seen better 10 or 20 years ago and all that's available now is product "X" with numerous flaws and quirks. I'd be happy to accept a critical review any time under such conditions, especially if criticisms can be backed up with evidence. All too often I've found that experts on product "X" are blissfully unaware of shortcomings, because they've been working with "X" exclusively and don't realize that products "Y" and "Z" are much better. In such cases the criticisms of product "X" from experts on products "Y" and "Z" carry more weight.
Python rounding
There have been a few attempts to insert phrasing such that Python follows "mathematical laws" or "floor and ceiling mathematical rules" on rounding. Most seem designed to simply promote Python over over languages, and suffer from some NPOV issues. However, there are substantially larger problems with these statements, which are:
- The claims are not properly cited.
- Rounding to the nearest smaller integer is floor semantics, not "floor and ceiling".
- Floor and ceiling are simply utility functions, not any sort of "mathematical law". Both of them -- along with the "nearest to zero" rounding performed by some other languages are equally valid mathematically (and to be strictly precise, none of them follow the generally accepted guidelines for mathematical rounding).
Fell Gleamingtalk 11:13, 25 August 2010 (UTC)
- Hi Fell. I can see your point, but I'm not happy with the current wording. It seems to imply that Python is out of step with other languages (which it is), but that there is no basis with the decision for Python to floor towards -infinity (which is wrong - it's a clear decision, as your ref clearly shows).
- I agree with your NPOV statement, but I feel the current wording is not neutral either. How can we word it so that Python is shown to be different but considered, and relevant based on mathematics?
- PS: Excellent ref you found - well done.
- peterl (talk) 10:13, 26 August 2010 (UTC)
- Maybe could state something like 'The result of integer division rounds towards negative infinity. This maintains the validity of of the equation b*( a/b)+a%b = a for all integers a, and positive integers b, as Python's modulus operation a % b results in a number in the range [0,b), following usual mathematical convention.' That's pretty verbose, though, and may not draw enough attention to the a < 0 case. --Aflafla1 (talk) 18:46, 30 August 2010 (UTC)