Talk:Python (programming language)/Archive 8: Difference between revisions

Content deleted Content added
MiszaBot I (talk | contribs)
m Archiving 2 thread(s) from Talk:Python (programming language).
MalnadachBot (talk | contribs)
m Fixed Lint errors. (Task 12)
 
(19 intermediate revisions by 4 users not shown)
Line 3:
== Indentation not significant? ==
 
Does anyone besides [[Special:Contributions/Strombrg|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. --[[User:Cybercobra|<b><font colorstyle="color:#3773A5;">Cyber</font></b><fontspan colorstyle="color:#FFB521;">cobra</fontspan>]] [[User talk: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. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 05:55, 15 March 2010 (UTC)
Line 9:
: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. <small><span class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Strombrg|Strombrg]] ([[User talk:Strombrg|talk]] • [[Special:Contributions/Strombrg|contribs]]) 00:41, 19 March 2010 (UTC)</span></small><!-- Template:Unsigned --> <!--Autosigned by SineBot-->
 
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. <font color="darkgreen">[[User:Lulu of the Lotus-Eaters|LotLE]]</font>×<fontspan colorstyle="darkred" size="-2color:darkgreen;">LotLE</span>]]×[[User talk:Lulu of the Lotus-Eaters|<span style="color:darkred; font-size:x-small;">talk]]</fontspan>]] 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. <small><span class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Strombrg|Strombrg]] ([[User talk:Strombrg|talk]] • [[Special:Contributions/Strombrg|contribs]]) 18:36, 20 March 2010 (UTC)</span></small><!-- Template:Unsigned --> <!--Autosigned by SineBot-->
Line 50:
* 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).
[[User:FellGleaming|<fontspan colorstyle="color:darkmagenta;"><b>F</b>ell <b>G</b>leaming</fontspan>]]<sup>[[User talk:FellGleaming|<fontspan colorstyle="color:black;">talk</fontspan>]]</sup> 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).
Line 92:
 
I am new to the editing of articles, so maybe I am missing something obvious to others. The Further Reading section needed improvement, so I added a good book and organized the list. Later the book list was severely pruned, but I do not understand what qualifies the books that remain. Selected Wikipedia policy was duplicated in the Further Reading section, but it appears that the policy is not being followed. Could someone please explain what I am missing here, or show an example of the proper way to add a book. Thanks. [[User:Lance Albin|Lance Albin]] ([[User talk:Lance Albin|talk]]) 03:37, 2 January 2011 (UTC)
== Performance ==
 
I've heard that Python's performance (unless optimized) isn't that great, however, I know nothing about this myself. Can someone put something about Python's performance compared to other high-level languages? <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/212.68.15.66|212.68.15.66]] ([[User talk:212.68.15.66|talk]]) 06:25, 3 February 2011 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
 
:Not really. It depends on too much. You might want to check [http://shootout.alioth.debian.org/dont-jump-to-conclusions.php this page] for why plus have some fun. P.S. I am assuming that you meant run-time performance. Ease/accuracy of development is another measure. --[[User:Paddy3118|Paddy]] ([[User talk:Paddy3118|talk]]) 12:22, 3 February 2011 (UTC)
 
::I totally agree with what you say about development/runtime performance (especially when it comes to Java, people are way too aggressive about its runtime performance in my opinion). Thanks for the link! [[Special:Contributions/212.68.15.66|212.68.15.66]] ([[User talk:212.68.15.66|talk]]) 06:58, 4 February 2011 (UTC)
 
:::Python and Java *can* perform well. But they rarely *do* in my experience. That's because high-level programming languages tend to discourage the kind of optimizations that are second-nature when doing lower-level programming. An exception to this is PERL, because it allows (and frequently uses) inline and XS compiled code.... where high level and low-level code can be freely mixed. <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/66.194.114.178|66.194.114.178]] ([[User talk:66.194.114.178|talk]]) 16:07, 18 May 2011 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
 
== Python 2 vs Python 3 ==
 
Are we assuming that nobody cares about Python 2 now? The table of built-in types was "simplified" by having it refer only to Python 3. I'm OK with that, as long as we also add a section describing the differences between 2 and 3. (I'm not sufficiently fluent in both to create such a section myself.) [[User:Joule36e5|Joule36e5]] ([[User talk:Joule36e5|talk]]) 02:18, 10 June 2011 (UTC)
:Python 2 will be in use for probably another 5-9 years. Most production is running under Python 2 now since programs need their library packages converted to Python 3 before they move over. --[[User:Javaweb|Javaweb]] ([[User talk:Javaweb|talk]]) 03:04, 10 June 2011 (UTC)Javaweb
== Pareto principle ==
 
'''''However, by the Pareto principle, most problems and sections of programs are not speed critical'''''.<br />
No, this is an observation, not a principle : Nothing '''proves''' that in ANY program, 80% of the calculi are made by 20% of the program code. I have however no better way to express it, and as such let this as it. [[User:Guigolum|Guigolum]] ([[User talk:Guigolum|talk]]) 06:22, 4 October 2010 (UTC)
 
: good example of the convlution required to get python to work fast: http://www.scipy.org/PerformancePython <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/66.194.114.178|66.194.114.178]] ([[User talk:66.194.114.178|talk]]) 16:14, 18 May 2011 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
 
:The Pareto principle is not a mathematical formula. The reference reads like a point is being proved based on a fact and this is not true, so the reference should be removed. [[Special:Contributions/122.167.224.5|122.167.224.5]] ([[User talk:122.167.224.5|talk]]) 13:36, 21 May 2011 (UTC)
 
:You're correct, of course, that the Pareto observation is not a mathematical formula, nor does it prove anything. However, it is a valid observation that programs spend most of their time executing inner loops and programmer effort spent 'optimizing' anything else will go entirely unnoticed. This is especially true on modern computers that frequently have large timing variations caused by such factors as pipeline bottlenecks and cache line conflicts. There is, in fact, nothing at all controversial about this, it has been known since the early days of Fortran optimizing compilers. The statement in the article did not present any controversial statement, nor did it make a claim of proof of anything. It expressed the attitude of the BDFL that code clarity is more important than a few nanocycles. If you don't like his attitude, there are other implementations of Python to satisfy your cycle-greedy hearts. I'm removing the noisy templates on this statement that add nothing to the content. [[User:Dlw20070716|Dlw20070716]] ([[User talk:Dlw20070716|talk]]) 07:58, 20 July 2011 (UTC)
 
== HelloWorld ==
 
The section on syntax needs a simple helloworld program to start with :). <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/199.212.225.1|199.212.225.1]] ([[User talk:199.212.225.1|talk]]) 20:26, 23 March 2011 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
:Python's hello world is so trivial
::Yes it is. I love Python (it's my first programming language but it's actually fun), and it's so easy it's almost funny. Anywho, Python's Hello World is simple:
::<big>>>>print 'Hello World'</big>
::<big>Hello World</big>
::So, yeah, it's a lot like ECHO on DOS, but probably not as noteworthy. [[User:Venku Tur&#39;Mukan|Venku Tur&#39;Mukan]] ([[User talk:Venku Tur&#39;Mukan|talk]]) 13:37, 7 April 2011 (UTC)
 
::Strongly agree that Hello World program belongs in the article. It is an extremely useful and quite subtle way of demonstrating syntactic, and even semantic, differences between languages. The above comment that Python's version is simple demonstrates why inclusion of the example is important. <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/86.177.104.152|86.177.104.152]] ([[User talk:86.177.104.152|talk]]) 07:48, 30 September 2011 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
 
:::If a programs syntax is usefully shown by how it prints hello world then the language can't be up to much. Hello World is like a dummy to a baby - initially soothing, but should be cast aside as one grows. --[[User:Paddy3118|Paddy]] ([[User talk:Paddy3118|talk]]) 09:22, 2 October 2011 (UTC)
 
::::Well, the Java "hello world" seems to tell you more about Java than the Python "hello world" tells you about Python. But this is because the Java "hello world" tells you that Java requires a ''main'' method, and a class for it; and that these must be saved to a file whose name matches that class. Python requires none of these things; but it is only by contrasting Python with Java (or COBOL, or any other high-boilerplate language) that Python's low-boilerplate nature is revealed. —[[User:Fubar Obfusco|FOo]] ([[User talk:Fubar Obfusco|talk]]) 21:57, 4 October 2011 (UTC)
 
:::::I also agree that a "hello world" should be included. I came to the article to specifically see what it looked like, and then came here to ask for it. Could someone who knows the syntax please add it? --[[User:A bit iffy|A bit iffy]] ([[User talk:A bit iffy|talk]]) 08:28, 29 December 2011 (UTC)
 
Added. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 00:17, 30 December 2011 (UTC)
:Thanks. --[[User:A bit iffy|A bit iffy]] ([[User talk:A bit iffy|talk]]) 05:49, 30 December 2011 (UTC)
 
It's a Python article. Why add new code in Python 2? I know that 2 is well used an' all, but the community is going all out for 3 and have stated many times that 2 should only be used if you need a library. This is new code and so should be in Python 3. --[[User:Paddy3118|Paddy]] ([[User talk:Paddy3118|talk]]) 10:54, 30 December 2011 (UTC)
 
:Fair enough. Why change the quotes? I've updated the comment. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 02:45, 2 January 2012 (UTC)
== Drawbacks ==
 
I notice that, although C/C++, PERL and other languages have significant mention of drawbacks, there is no negative commentary about python. In fact the page reads like an "evangelists guide" to python. Personally I find python's whitespace-dependence to be horrible, and there are probably tens of thousands of others who take issue with the "lisp-like" convolution of operators... such as ... " ".join(list). Probably this comment will be removed.<span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/66.194.114.178|66.194.114.178]] ([[User talk:66.194.114.178|talk]]) 16:11, 18 May 2011 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
:No language is perfect. The [[Perl]] article has very little criticism, although [[Talk:Perl#Criticism_.26_Bias|it should have]]. I must disagree about whitespace; some people hate it, but as a professional language trainer the improvement in beginners' code is demonstrable. Yes, Python is not without its warts. Constructive, referenced edits are always welcome. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 01:01, 20 May 2011 (UTC)
::I agree this article needs more criticism, especially because most flaws in Python are technical, not philosophical, when compared to Perl and therefor are much better suited for a neutral Wikipedia. Also Perl has some kind of workaround for all of the criticism (Moose for OO to give an example), something that Python has in many cases, but not in all of them. However I'd, like in all programming related articles add criticism in form of fact mentioned in various sections of the articles. This would make it harder to include opinions. Also I wouldn't include quotes, because they are NEVER neutral. --[[User:Athaba|Athaba]] ([[User talk:Athaba|talk]]) 13:50, 18 August 2011 (UTC)
::Consider a programmer picking a language that they would like to learn, it is wise to weigh the pros and cons of the language so as to determine where the language fits best. This article cannot help with that sort of endeavor without delving in to some of the negative aspects of the language (the preachers of the church of Python need not comment). If I knew more python I would help, perhaps someone who has used python in more production projects would like to take a shot? [[Special:Contributions/108.2.124.115|108.2.124.115]] ([[User talk:108.2.124.115|talk]]) 03:57, 2 September 2011 (UTC)
 
:I ''don't'' think that a criticism section can be sufficiently 'policed'. --[[User:Paddy3118|Paddy]] ([[User talk:Paddy3118|talk]]) 09:39, 2 September 2011 (UTC)
 
It would be accurate to say that many newcomers to Python who have experience with curly-brace languages find "the whitespace thing" to be confusing. However, people with experience in multiple languages from different language families generally look beyond the "surface syntax" of any language and address more substantial issues — such as formal properties of the language (e.g. type system, exception system) or its implementations (compilation, efficiency, etc.)
 
There has been ''substantial'' criticism of Python in these regards. For instance: The extreme dynamism of Python makes it difficult to prove any formal properties of a Python program. The absence of static typing of any sort (declared or inferred) makes certain errors impossible to catch at compile-time, which could be caught in statically-typed languages. As a bytecode interpreter, the mainstream CPython implementation is slower than native-code compiled programming systems. Thanks to the Global Interpreter Lock, native Python code cannot scale to multiple processors without extensive reworking.
 
Yet at the same time, it is worth noting that many professors and teachers, who have professional experience with many programming languages, choose Python as a language for teaching new students. For instance, Python is one of a very few languages commonly used for teaching at the undergraduate level in top-ranked engineering universities such as MIT and CMU. This strongly suggests that Python is ''not'' wholly unsuitable as a language; and further that neither "the whitespace thing" nor any other feature make Python unnecessarily difficult for newcomers.
 
Professional software engineers and computer scientists are expected, as part of a successful educational and career path, to learn ''many'' programming languages, and to choose the appropriate ones for particular purposes. As such, professionals do not expect any one language to be ideal for ''all'' purposes, and are often ''very'' interested in understanding the strengths and weaknesses of the various languages available to them. I use Python every week, and would strongly suggest that critiques written by newcomers to Python are probably less well-informed, and less [[WP:RS|reliable as sources]], than critiques written by people with extensive experience both with Python and other languages from multiple language families. —[[User:Fubar Obfusco|FOo]] ([[User talk:Fubar Obfusco|talk]]) 23:35, 3 September 2011 (UTC)
 
:Nicely said. As a professional language trainer, you have summarised these points well. Do note that GIL is only a part of CPython, and not other implementations, such as Parallel Python, IronPython, Jython, Stackless etc. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 07:00, 4 September 2011 (UTC)
 
== Typing in the sidebar ==
 
Why does the sidebar say that it's a strong typed language? Duck and dynamic are right, but it's not strong. I'm going to remove this.
<span style="color:#008888;">[[User:Asmeurer|<span style="color:#008888;">asmeurer</span>]] ([[User talk:Asmeurer|<span style="color:#008888;">talk</span>]] | [[Special:Contributions/Asmeurer|<span style="color:#008888;">contribs</span>]])</span> 22:18, 6 July 2011 (UTC)
:Because it is? (see amongst [http://wiki.python.org/moin/Why%20is%20Python%20a%20dynamic%20language%20and%20also%20a%20strongly%20typed%20language this] for instance).--[[User:KimDabelsteinPetersen|Kim D. Petersen]] ([[User talk:KimDabelsteinPetersen|talk]]) 00:54, 7 July 2011 (UTC)
:I think you are confusing strong and static. See our articles on them. --[[User:Cybercobra|<b style="color:#3773A5;">Cyber</b><span style="color:#FFB521;">cobra</span>]] [[User talk:Cybercobra|(talk)]] 03:44, 7 July 2011 (UTC)
== "general purpose" ==
 
What does "general purpose" mean in the lead here? What would be an example of a non-general purpose programming language? To me, the phrase "general purpose" implies that it's not tied to a specific situation but I think that is implicitly implied when you say "programming language" anyway. Perhaps there's a technical usage of the term I am unaware of. [[User:Jason Quinn|Jason Quinn]] ([[User talk:Jason Quinn|talk]]) 17:28, 29 September 2011 (UTC)
:"General purpose" as opposed to [[___domain-specific language|___domain-specific]] (e.g. [[R (programming language)]], whose use is generally limited to statistics). --[[User:Cybercobra|<b style="color:#3773A5;">Cyber</b><span style="color:#FFB521;">cobra</span>]] [[User talk:Cybercobra|(talk)]] 18:02, 29 September 2011 (UTC)
 
== Influence by Java, Lisp or Perl ? ==
 
This three claims do not have any strong backing references. The "Java" thing is especially weird, because
Python was created 4 years *before* Java and I can't even name a single feature added later that would be similar to Java. Dunno about Perl. As for Lisp, we already say it's influenced by Haskell, which is influenced by Lisp - I don't think there was much direct influence. I propose removing all three if no one can come up with citations. [[User:Lrekucki|Lrekucki]] ([[User talk:Lrekucki|talk]]) 07:42, 24 February 2012 (UTC)
:The syntax for decorators, and the <tt>logging</tt> std lib module take direct inspiration from Java. --[[User:Cybercobra|<b style="color:#3773A5;">Cyber</b><span style="color:#FFB521;">cobra</span>]] [[User talk:Cybercobra|(talk)]] 09:42, 24 February 2012 (UTC)
::Agreed about the decorators, but I don't think logging (or unittest based directly on JUnit or any other stdlib module) should be treated as an influence to Python (the language). [[User:Lrekucki|Lrekucki]] ([[User talk:Lrekucki|talk]]) 15:30, 24 February 2012 (UTC)
:With Perl, it's basically an "anti-influence". Python in part define(d) itself in contrast to Perl; see 3rd-to-last paragraph of [[Python_(programming_language)#Programming_philosophy|''Programming philosophy'']]. --[[User:Cybercobra|<b style="color:#3773A5;">Cyber</b><span style="color:#FFB521;">cobra</span>]] [[User talk:Cybercobra|(talk)]] 09:54, 24 February 2012 (UTC)
:: This is a bit confusing. Any standard way to mark this as "anti-influence" as you called it ? [[User:Lrekucki|Lrekucki]] ([[User talk:Lrekucki|talk]]) 15:30, 24 February 2012 (UTC)
 
On a side note, are there any rules for marking major influences (like marking them as bold) ? [[User:Lrekucki|Lrekucki]] ([[User talk:Lrekucki|talk]]) 15:30, 24 February 2012 (UTC)
:Nope. --[[User:Cybercobra|<b style="color:#3773A5;">Cyber</b><span style="color:#FFB521;">cobra</span>]] [[User talk:Cybercobra|(talk)]] 22:23, 24 February 2012 (UTC)
== Everything is remarkable ==
 
A fan of language X claims it has "remarkable power with very clear syntax", is it worthy of quoting this statement in the introduction of a Wikipedia article? I think it is as worthy of mention as quoting somebody who is not a fan of Python who claims it is "as powerful as most modern languages but not as readable".
 
Is there any empirical research measuring clearness of syntax (I am not aware of any and I have looked)? What method did the person being quoted use to measure clarity?
 
What remarkable power does Python have? Can it compute functions that cannot be computed by a [[Turing machine]]? If not then it is just as powerful as most other programming language.
 
This "remarkable power..." quote is pure POV puff and should be removed. [[User:Derek farn|Derek farn]] ([[User talk:Derek farn|talk]]) 14:46, 29 May 2012 (UTC)
:Python is generally known for having a comparatively "clean" syntax. The description is from the official FAQ, not some random author, and is appropriately qualified ("claims to", as opposed to a factual "is" statement). "Power" as in being [[high-level programming language|high-level]] (compared to e.g. [[C (programming language)|C]]; it's a [[scripting language]]); do you have a suggestion for a better description for this aspect? --[[User:Cybercobra|<b style="color:#3773A5;">Cyber</b><span style="color:#FFB521;">cobra</span>]] [[User talk:Cybercobra|(talk)]] 18:46, 29 May 2012 (UTC)
::Who is the "generally known"? Has there been a poll of users of different languages? You are now saying Python has "clean syntax" the quote calls it "clear syntax", can you tell me how to measure the cleanness and clearness of a language syntax?
 
::The Python FAQ should probably be regarded as self serving statement made by people who are fans of the language, i.e., it is not an unbiased source of information.
 
::If high-level language was intended why was the word "power" used? C users seem to regard their language as being high-level. Does "power" imply scripting (I don't user Python for scripting and I have known developers use C for scripting {no idea why})?
 
::Your points about Python being a high-level language and scripting are good ones, why not put them in the introduction. The quote reads like advertising copy and is out of place in a Wikipedia article that aims to be objective. [[User:Derek farn|Derek farn]] ([[User talk:Derek farn|talk]]) 22:51, 29 May 2012 (UTC)
:::I’d consider that quote a [[WP:primary source|primary source]] and I always thought is was given too much emphasis, being in the second sentence of the article. If you want people to take it seriously, perhaps find a quote saying the developers ''design'' Python with these goals in mind. I’m guessing “power” means something like “programming efficiency”, like putting together a complex system in ten minutes and fifty lines of code without even thinking about it. [[User:Vadmium|Vadmium]] ([[User talk:Vadmium|talk]], [[Special:Contributions/Vadmium|contribs]]) 01:48, 30 May 2012 (UTC).
 
::::The developers clearly have this a design goal - see the [http://docs.python.org/faq/general.html#what-is-python FAQ]. I agree, just because it is a goal doesn't mean it is achieved. But is very clearly a high-level design goal - see [http://www.stanford.edu%2Fclass%2Fcs242%2Fslides%2F2006%2Fpython-vanRossum.ppt&ei=UO7FT_2DFaWUiQfcoJn1Ag&usg=AFQjCNGJB5HcpA_5_LgnI2VBNLiiiu-w-w] (slide 9 'power' and slide 7 'readability')
::::I have to remove 'Like promoters of other languages Python users', as I don't know of any other language that claims this - again I'm not saying Python achieves that, it's just a claim Python (that is, the developers of Python) make(s).
::::[[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 10:19, 30 May 2012 (UTC)
 
What does "remarkable power" mean and how does it differ from "Powerful" or even "unremarkable power"? What languages are not remarkably powerful and how is this quantity measured? It sounds like advertising puff to me. [[User:Derek farn|Derek farn]] ([[User talk:Derek farn|talk]]) 10:56, 30 May 2012 (UTC)
 
:I've restored the 'clear syntax' phrase, as 1. It is claimed in the references, and 2. It's different to readability. Readability covers everything from useful keywords, ease of documenting, and syntax, amongst other things.
:Re 'remarkable power' - that's it's design philosophy. My guess is it means a useful, powerful language that is surprising or remarkable given the simplicity of the syntax. I wasn't the originator of Python, but that's my guess. Comparing it to VB (easy, clear syntax, no power, difficult to do advanced things) or Perl (not easy, cryptic, very powerful) makes the joining of readable, clear syntax and useful power 'remarkable'.
:That's just my view, but the refs make it plain that was their design philosophy.
:I can't find a ref for it by 'man python' on Unix gives us that first sentence.
:[[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 23:28, 31 May 2012 (UTC)
:::Man page (unformatted): [http://hg.python.org/cpython/file/tip/Misc/python.man Misc/python.man] from Python’s source code repository, and a [http://hg.python.org/cpython/file/c9b3f77e18ba/Misc/python.man 1994 version]. The ''Unix Power Tools'' reference added the other day is just quoting from the Python web site: [http://web.archive.org/web/20021205102726/http://www.python.org/doc/Summary.html "What is Python?", 2002], and the Fipy manual also uses very similar wording to the man page. [[User:Vadmium|Vadmium]] ([[User talk:Vadmium|talk]], [[Special:Contributions/Vadmium|contribs]]) 03:01, 1 June 2012 (UTC).
 
::So far we have had three different guesses at what "remarkable power" refers to in this discussion: 1) "high-level" 2) "programming efficiency" 3) "useful, powerful" (Please correct me if I have misinterpreted anyone's comment)
::Therefore I think that using this terminology is a bad idea as it is obviously ambiguous and I'd like to have this statement removed or replaced. --[[User:Marko Knoebl|Marko Knoebl]] ([[User talk:Marko Knoebl|talk]]) 08:23, 4 June 2012 (UTC)
 
:::I'd rather change it to something along the lines of (Python describes itself as) or (The Python designers call it) "an interpreted, interactive, object-oriented programming language that combines remarkable power with very clear syntax." [http://hg.python.org/cpython/file/c9b3f77e18ba/Misc/python.man]
:::[[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 21:45, 4 June 2012 (UTC)
::::I don't see much value in this because only the Python designers really know what "remarkable power" is supposed to refer to. You already said that your interpretation was just a guess.--[[User:Marko Knoebl|Marko Knoebl]] ([[User talk:Marko Knoebl|talk]]) 14:26, 5 June 2012 (UTC)
:::I see no such ambiguity; all 3 phrasings refer to the same property, AIUI. I do admit that it's hard to find a definitive name for the property, though "high-level" seems fairly well accepted. I concur with Peter that we just need to properly attribute the source. Would striking or replacing the "remarkable" qualifier satisfy your concerns? --[[User:Cybercobra|<b style="color:#3773A5;">Cyber</b><span style="color:#FFB521;">cobra</span>]] [[User talk:Cybercobra|(talk)]] 22:56, 4 June 2012 (UTC)
 
::::Although I do like the whole quote as that what Python (i.e its designers) say about it.
::::[[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 05:11, 5 June 2012 (UTC)
 
::::To me, all these 3 phrases have a different meaning: For example, I consider Java a high-level language whith a low programming efficiency. Furthermore in the past this article attributed Python's power to its large standard library - this article's version from 23 April says: 'Python claims to combine "remarkable power with very clear syntax" by using a large and comprehensive standard library and a design philosophy which emphasizes code readability.'
::::You are saying that "high-level" is a fairly well accepted term for the attribute you want to describe. Ok, so let's use that term! I have absoulutely no problem with calling Python a high-level language: This term is relatively well-defined. --[[User:Marko Knoebl|Marko Knoebl]] ([[User talk:Marko Knoebl|talk]]) 14:26, 5 June 2012 (UTC)
:::::Would it be okay if I changed the introduction to say that Python is a high-level language and that its syntax is clear and expressive? I think this reflects the properties which some call "powerful" and is less ambiguous. --[[User:Marko Knoebl|Marko Knoebl]] ([[User talk:Marko Knoebl|talk]]) 15:33, 9 June 2012 (UTC)
 
If we are going to include a quote extolling the virtues of Python, by its creators, as unbiased editors we should also include a quote from one of Python's detractors (I don't have one to hand but I'm sure we can find one). [[User:Derek farn|Derek farn]] ([[User talk:Derek farn|talk]]) 14:13, 5 June 2012 (UTC)
:That isn't ''all'' we can do. We could, for example, just state that the quote is from its creators. --[[User:Paddy3118|Paddy]] ([[User talk:Paddy3118|talk]]) 04:05, 6 June 2012 (UTC)
 
== Incorrect Claim ==
 
The claim 'OCaml has an optional syntax, called twt (The Whitespace Thing), inspired by Python and Haskell.' is not strictly true: OCaml+TWT is a separate non-standard tool that compiles a variant of OCaml to standard OCaml -- it is in no way part of OCaml; neither is it supported by any of the OCaml tools. (F# -- an OCaml-like language -- however, has 'light' syntax that uses whitespace / indentation, much like Python and Haskell.) <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/208.54.5.146|208.54.5.146]] ([[User talk:208.54.5.146|talk]]) 19:19, 23 July 2012 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
== Weasel? ==
 
I've removed the weasel tag, as there was no justification when it was put on. Which words are wesel? Which statements are unverified? This is a fairly well ref'd article, so more info needs to be given if it is to be given this tag. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 06:17, 22 August 2012 (UTC)
 
== Some code samples are needed ==
 
Importing a good piece of advice from [http://en.wikipedia.org/wiki/Talk:Perl#No_example_code.3F the Perl programming language talk page], the page could use some short pieces of example code. I would have written this myself, but I'm not sure if my Python style is very Pythonic or not. [[User:Shlomif|Shlomif]] ([[User talk:Shlomif|talk]]) 18:07, 26 November 2012 (UTC)
 
== “Python syntax clear” (neutrality issue) ==
 
I added (note that I did not remove the original assertion and reference) this alternative contradictory reference to the assertion Python's syntax is clear:
:<nowiki>or ugly<ref>[http://c2.com/cgi/wiki?PythonProblems Python Problems]: “<cite>Underscores for privates members are ugly</cite>” (among other comments)</ref></nowiki>
Someone (anonymously) later removed it, arguing the reference, which is c2.com, the Portland Patterns Repository, is not a valid source. Unfortunately, Wikipedia often cite the Portland Patterns Repository as a reference. So: either leave it or remove all reference to Portland Patterns Repository? Other options: either remove the assertion “Python syntax is said to be clear” or leave the contradictory option? (to keep the document neutral). It's likely if your only source is at Python advocates places, and you consider just these and only these sources are valid references, you obviously won't get anything else. I believe there is a neutrality issue here. By the way, there could be a “criticism” section in that page, as there is enough materials and references to feed such a section. --[[User:Hibou57|Hibou57]] ([[User talk:Hibou57|talk]]) 13:27, 14 September 2012 (UTC)
:The reference given to assert Python syntax is clear, is actually just this:
::“Mark Summerfield. Rapid GUI Programming with Python and Qt. "If you are new to Python: Welcome! You are about to discover a language that is clear to read and write, and that is concise without being cryptic."”
:Not even a reference: in a book? a talk-show? a blog? The person who remove my reference, asserted it's source is not valid. But that citation without even a source is valid to that person? There is an issue here.
:Then, second “reference” follow, related to the assertion Python is expressive, which is just a quote, without any reference:
::“Mark Summerfield. Rapid GUI Programming with Python and Qt. "Python is a very expressive language, which means that we can usually write far fewer lines of Python code than would be required for an equivalent application written in, say, C++ or Java."”
:Same story: quoted from who/what? Where is the reference? I don't believe Mark Summerfield's personal words (without giving any source for it above all), which is not a programming language specialist, but a Qt developer, do value more than an as much personal opinion (with a reference at least) expressed at the Portland Repository, which at least comes with more materials around. --[[User:Hibou57|Hibou57]] ([[User talk:Hibou57|talk]]) 13:44, 14 September 2012 (UTC)
 
:: [[WP:OSE]]. C2 clearly isn't [[WP:RS]], and this isn't changed even if other WP articles cite it. OTOH, not all references are required to meet WP:RS anyway.
:: IMHO, the private identifier syntax ''is'' ugly, at least when it requires direct access to name-mangled methods. [[User:Andy Dingley|Andy Dingley]] ([[User talk:Andy Dingley|talk]]) 13:50, 14 September 2012 (UTC)
 
:::I've removed the ref, as the reference only talks about underscores on privates being ugly, not the whole syntax. I can't find any ref saying the whole of Python's syntax is ugly - if anything the exact opposite. It's not fair to give the 'ugly' statement the same prominence as clear in the very first sentence.
:::I've added back in a ref from Python's own description at [http://wiki.python.org/moin/] which is where we ended up up with 'said to be' rather than 'is'.
:::[[User:Peterl|peterl]] ([[User talk:Peterl|talk]])
 
::::“said to be” is obviously not as strong as “is”, but that does not solve the issue (which is somewhat minor in some aspect, but still suspicious). What about just keeping the reference to the Python wiki and removing the two quotes from Mark Summerfield? --[[User:Hibou57|Hibou57]] ([[User talk:Hibou57|talk]]) 17:08, 11 October 2012 (UTC)
 
:::::I don't know why those references should be removed - they are relevant, ref'd and notable (although I don't have the book to check). Amazon lists 8 books by MS. Obviously there must be many people that have said similar things; I'd be happy with any other similar ref added in. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 21:13, 11 October 2012 (UTC)
 
I'm uncomfortable with saying python's syntax enables shorter programs. This is definitely true in certain cases with list comprehensions, but for the most part you can pack just as much into a line of C. Sometimes more, for example <pre>if (int a=call()) output(a); else output(!a);</pre>. Those two lines of C would be three lines in python. Maybe a better statement would be 'python's tersely designed and comprehensive standard library often results in shorter programs than low-level languages like C'. Python's syntax was designed to be easy to parse which made it less flexible than C. It's not syntax that makes python programs shorter, it's the standard library. [[User:Awinter cs|Awinter cs]] ([[User talk:Awinter cs|talk]]) 16:48, 8 April 2013 (UTC)
 
:I'm not clear on what you're saying. The article itself doesn't mention 'shorter programs'. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 22:03, 8 April 2013 (UTC)
 
:: It's in the first paragraph. 'Python's syntax allows programmers to express concepts in fewer lines of code'. [[User:Awinter cs|Awinter cs]] ([[User talk:Awinter cs|talk]]) 02:45, 9 April 2013 (UTC)
 
::: OK, I see what you mean. I'm not sure if I agree with the current wording either. I like the 'express concepts', because doing a dictionary of lists is trivially easy compared to C. But I don't think it's the ''syntax'' of Python that makes that so easy. Perhaps just say 'Python allows programmers to express concepts in fewer lines of code...', or 'Python allows programmers to express complex concepts'...
::: I'm having trouble with the link #11 to Code Complete - it's broken for me. I've got edition 1 of the book, and there's nothing on page 100 that's relevant. Can you get to the link? [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 03:17, 9 April 2013 (UTC)
 
:::: do you mean link [12], the google books result? It worked the second time I clicked it. It's just one of those equivalence charts saying that one statement in python is worth 6 in C. I've never understood these -- C++, if not C, could be as concise as python if we wrote loosely-typed libraries for it that are as slow as python. It's not the language, it's the libraries. Regarding the wording of this article, maybe it's okay as-is; the distinction between syntax and libraries might not mean a lot to anybody who doesn't already know the difference. [[User:Awinter cs|Awinter cs]] ([[User talk:Awinter cs|talk]]) 21:00, 11 April 2013 (UTC)
 
::::: Oh now it's working for me. Thanks. The vagaries of the internet. It's a well sourced relevant page, although it would be interesting to see the original study. I guess it gives support to the 'fewer lines' claim. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 22:59, 11 April 2013 (UTC)
 
== Interpreted vs compiled ==
 
I'm not a python expert but I think it should be pointed out that the statement "Python is [...] ''interpreted'' high-level programming language" at the beginning of the article is at least misleading...and at most wrong. As it is explained [http://stackoverflow.com/questions/6889747/is-python-interpreted-or-compiled-or-both here] and [http://stackoverflow.com/questions/745743/is-python-interpreted-like-javascript-or-php here], in the reference implementation a Python program is '''compiled''' into bytecode --[[User:Millsabord|Millsabord]] ([[User talk:Millsabord|talk]]) 22:57, 27 January 2013 (UTC)
 
:I agree that the term ''interpreted'' is not well-defined. However I think Python definitely qualifies for all modern definitions of ''interpreted''. As explained in [[Interpreter (computing)]], direct execution of source code is very rare. As far as I know no modern programming language uses this technique anymore. So excluding Python from the group of interpreted languages would basically mean that there are no interpreted languages at all. Anyhow I'm not strongly opposed to removing it as the term is definitely ambiguous.--[[Special:Contributions/91.114.185.145|91.114.185.145]] ([[User talk:91.114.185.145|talk]]) 13:06, 28 January 2013 (UTC)
 
@[[User:Carbo1200]] I see my remark has been taken into account, thanks --[[Special:Contributions/195.13.33.18|195.13.33.18]] ([[User talk:195.13.33.18|talk]]) 14:03, 28 January 2013 (UTC)
 
== History wrong ==
 
On this page, it is said in the right hand box, that Python "appears" in 1991. On this other page: http://en.wikipedia.org/wiki/History_of_Python , it is noted that Python 2.0 was released 16 October 2000 (quote from that page), but there have been releases 1.5 and 1.3, at least (I have a book about Python version 1.5). Therefore, I dispute the stated date. But I don't know the correct date, or otherwise, I would have corrected it.
[[Special:Contributions/2A01:170:1078:1:0:0:0:10AA|2A01:170:1078:1:0:0:0:10AA]] ([[User talk:2A01:170:1078:1:0:0:0:10AA|talk]]) 04:58, 3 March 2013 (UTC)
:First public release on alt.sources (v 0.9.0): Feb 20, 1991[http://python-history.blogspot.nl/2009/01/brief-timeline-of-python.html] according to Guido van Rossom. What is the dispute? --[[User:KimDabelsteinPetersen|Kim D. Petersen]] ([[User talk:KimDabelsteinPetersen|talk]]) 05:03, 3 March 2013 (UTC)
 
== "Third most popular language not based on C" - relevance ==
 
Recently the following sentence was added to the lead section and to the section ''Use'':
:"Python is the third most popular programming language whose [[Syntax (programming languages)|grammatical syntax]] is not predominantly based on [[C (programming language)|C]]"
Personally I think that this fact is not relevant enough to be included in the article. There are probably more important facts about Python's popularity (e.g. according to TIOBE it's the second most popular dynamic language - I think this is much more relevant). Furthermore the [[TIOBE index]] and its methods of ranking have been criticised (see article) and there are other rankings that put Python in a different place. I will remove the sentence from the lead section now and I would also like to remove it from the article body. If you disagree, let's discuss it here. --[[User:Marko Knoebl|Marko Knoebl]] ([[User talk:Marko Knoebl|talk]]) 18:05, 10 June 2013 (UTC)
 
Python's popularity is an important piece of information to give the reader a sense of the language being described. There are hundreds (thousands?) of computer programming languages. Why should the reader care about Python? A big factor is its popularity -- that's a major reason why the reader should continue beyond the introduction. The TIOBE index might not be perfect, but why throw it out? Identifying Python as the second most popular dynamic language would work too. <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/98.248.237.50|98.248.237.50]] ([[User talk:98.248.237.50|talk]]) 06:07, 11 June 2013 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
 
I think popularity is relevant, and would like something about it in the lead section. It's a significant aspect about Python. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 12:32, 11 June 2013 (UTC)
:I've added 'popular' to the lead sentence. While this doesn't give complete coverage of the popularity, I think (and the above para notes) it's an important 'feature' or characteristic of Python. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 00:40, 13 June 2013 (UTC)
 
Thanks for the comments so far. I definitely agree that Python's popularity is important and should be mentioned in this article. My concern was only that the description of Python as the "third most popular programming language whose syntax is not predominantly based on C" was too specific. I think Peterl solved this nicely with his edits to the lead section by stating that "Python is a popular [...] programming language". I think we can keep the introduction this way. Is that OK?
 
Concerning the remaining sentence in the article body: What about writing it less specifically here as well? What about stating: "Python is one of the most popular programming languages not predominantly based on C"? That statement is much easier to prove by multiple sources and won't change over time. (According to the TIOBE index Python was not third in February 2013 - it was second, and has remained very close to number two ever since) Anyways I still think that the criterion "not predominantly based on C" is not that relevant and I'd rather prefer the sentence "Python is one of the most popular dynamic langages." -[[User:Marko Knoebl|Marko Knoebl]] ([[User talk:Marko Knoebl|talk]]) 17:09, 15 June 2013 (UTC)
 
== Describing Python as Strongly typed is ambigious ==
 
I think calling a language "weakly typed" or "strongly typed" is a poor and ambiguous description. Strong typing can mean a language is statically typed, has type safety or both depending on the context. In this case only type safety and not the static typing applies. The fact that one could say both C++ and Python are strongly typed when meaning completely different things (dynamic typing plus type safety, vs static typing plus type unsafety) makes this a very poor term that should be avoided in my opinion. Additionally, as the [[Strong and weak typing]] article describes, these are often not objective terms and mostly used when criticizing or advocating a particular language. I would advocate changing the type system description from strongly typed to safely typed.
 
Along the same lines, I think the line
<blockquote>Despite being dynamically typed, Python is strongly typed, forbidding operations that are not well-defined (for example, adding a number to a string) rather than silently attempting to make sense of them.</blockquote> should be rewritten or removed. The argument that not allowing using the <code>+</code> operator on numbers and strings means a type system is strong is a straw man. I can create a class in Python that does absurd things with the <code>+</code> operator but that does not mean the type system is any stronger or weaker. It simply means I have the freedom to overload that operator however I choose, and that the language designers had the good sense not to overload the <code>+</code> operator for numbers and strings (or not to add an implicit conversion from numbers to strings).
[[User:Nali4Freedom|Nali4Freedom]] ([[User talk:Nali4Freedom|talk]]) 19:03, 17 June 2013 (UTC)
 
:I agree: I think both should be changed. --[[User:Marko Knoebl|Marko Knoebl]] ([[User talk:Marko Knoebl|talk]]) 10:03, 20 June 2013 (UTC)
 
== Bullet point list of Uses/Applications ==
 
I think it would be easier to read the section entitled "Use" if it included a bullet pointed list. Here's a start:
 
* Scientific computing (NumPy, SciPy, Sage, etc.)
* web dev (Django, etc.)
* admin scripting (Salt, bcfg2, OpenStack)
* game scripting (Civilization 4, etc.)
* 3D applications (Blender, etc.)
* Linux applications (nearly everything in Ubuntu)
* Largescale web development (e.g. Instagram which is Django, Disqus, Quora)
* Game creation (Eve Online, etc.)
* Neuroscience.[http://www.frontiersin.org/neuroinformatics/researchtopics/Python_in_neuroscience/8]
* Bioinformatics
* Crossplatform GUI applications
* Robotics ([[Python Robotics|Pyro]], etc.)
* Raspberry Pi
 
FYI, the starting point for this list is in this thread: http://www.reddit.com/r/Python/comments/1k74jb/ruby_vs_python/ . There's more good information there on the topic. Perhaps the Use section could even be split in two: "Use" and "Applications," where the Use section discusses the language's popularity generally, while the Applications section has a bullet list like this. Others are welcome to revise/incorporate this comment as they like. Thanks. [[Special:Contributions/107.3.156.34|107.3.156.34]] ([[User talk:107.3.156.34|talk]]) 17:09, 11 February 2014 (UTC)
 
 
:I agree. I'm not sure what order those topics should be in, though. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 20:56, 11 February 2014 (UTC)
 
:I disagree. Wikipedia is not reddit - it is an encyclopedia. The [[Wikipedia:Manual of Style/Embedded lists|MOS]] says articles should be primary prose. [[User:Meshach|meshach]] ([[User talk:Meshach|talk]]) 21:22, 11 February 2014 (UTC)
 
::Perhaps articles should be primarily readable as prose, but there are plenty of examples in Wikipedia of bullet lists being used appropriately within that context. Indeed, this Python article already has ten such bullet lists :), and I would not be supportive of removing them. They're quite helpful for the reader. I'd suggest adding some "meat" to each bullet list that isn't otherwise self-descriptive. [[Special:Contributions/107.3.156.34|107.3.156.34]] ([[User talk:107.3.156.34|talk]]) 22:04, 20 March 2014 (UTC)
 
== Speed ==
 
According to an undocumented statement in Wik simple English, running speed for C is (up to?) 200 times faster than Python. Ef this is anywhere near correct, it should be documented and included in our article. [[Special:Contributions/211.225.33.104|211.225.33.104]] ([[User talk:211.225.33.104|talk]]) 06:57, 16 June 2014 (UTC)
:There are several different implementations of Python, and speed is relevant to the implementation rather than to the language. This is also true of C implementations, but the difference in speed is greater with Python than with modern optimising C compilers. Different benchmark programs will also give significantly different results.
:Such a statement belongs in our articles on, for example, [[CPython]] or [[PyPy]], with suitable sources, rather than in this article on the language.-<span style="font-family:cursive; color:grey;">[[User talk:gadfium|gadfium]]</span> 07:48, 16 June 2014 (UTC)
 
== Python 2 types ==
 
The table of types only describes Python 3 types, and it describes 'str' as 'A character string: an immutable sequence of Unicode codepoints.' which is of course very true for python 3, but very wrong in python 2. Python 2 is still quite commonly used, and in python 2 str is ASCII rather than unicode, and there is a base type 'basestring' and a subclass 'unicode'.
 
There are likely other differences between the two versions, and I think it is worth having them side by side in the table, rather than only describe Python 3. The other main difference I can see is that py3 int is essentially the py2 long, and py3 'bytes' is probably buffer() in py2, but I am not sure about that one.
 
If we didnt include python 2 in the table, I would like to add a note under the table that explains that the Python 3 'str' and 'int' are the Python 2 'unicode' and 'long', and the Python 2 types 'str' and 'int', which existed due to hardware/architecture/performance issues rather than ideal-world language "beauty", have been dropped in Python 3. <span style="font-variant:small-caps">[[User:John Vandenberg|John Vandenberg]] <sup>'''([[User talk:John Vandenberg|chat]])'''</sup></span> 06:00, 12 July 2014 (UTC)
 
== Influenced Javascript ==
 
It appears that someone has added "[Citation Needed]" next to Javascript in the Influenced property of the Infobox.
 
Here are two citations regarding how Python influenced ECMAScript (and, thus, Javascript):
 
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Array_comprehensions#Differences_to_the_older_JS1.7.2FJS1.8_comprehensions
 
[[User:Wes.turner|Wes Turner]] ([[User talk:Wes.turner|talk]]) 21:19, 4 November 2014 (UTC)
: Wouldn't they be more convincing if they contained the word "Python"? [[User:Andy Dingley|Andy Dingley]] ([[User talk:Andy Dingley|talk]]) 21:44, 4 November 2014 (UTC)
 
== Influenced by Java? ==
 
The article lists Java as an influence and the citation just mentions decorators as being influenced by Java. That seems like a pretty small influence. Seems like there either needs to be a better citation or maybe Java (which evidently didn't appear until 4 years after Python) shouldn't be on the lengthy list of influences. [[Special:Contributions/50.46.176.46|50.46.176.46]] ([[User talk:50.46.176.46|talk]]) 05:14, 24 October 2014 (UTC)
 
:It seems to me pretty clear influence. Although Java didn't influence a lot in Python, it clearly influenced decorators. From the ref:
:"Guido took a list of proposals to EuroPython 2004 [7], where a discussion took place. Subsequent to this, he decided that we'd have the Java-style [10] @decorator syntax, and this appeared for the first time in 2.4a2"
:The ref is in a PEP, so it's pretty high-grade ref IMO.
:[[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 09:56, 5 November 2014 (UTC)
:: The trouble is that this is a ''very'' minor influence, yet the hive-mind at WP will probably now categorize Python as a "Java-based language".
:: Decorators didn't come from Java - they were long pre-existing before Java, and before most WP editors were born. What Python took from Java was a convenient syntactic style for representing decorators in source, no more. [[User:Andy Dingley|Andy Dingley]] ([[User talk:Andy Dingley|talk]]) 10:20, 5 November 2014 (UTC)
 
== Duck typing? ==
 
Is Python duck typed? re [https://en.wikipedia.org/w/index.php?title=Python_%28programming_language%29&curid=23862&diff=651243176&oldid=651236498]
 
IMHO, we should take this term out and burn it. The term "duck typing" is badly skunked: it so abused and misused that no-one knows what it means. Firstly few can define it and secondly (and most importantly) it's used to mean two contradictory things so frequently that no-one can ever communicate anything by its use.
 
"Duck typing" first became popular because Martelli in 2000 [https://groups.google.com/forum/?hl=en#!msg/comp.lang.python/CCs2oJdyuzc/NYjla5HKMOIJ] used it in reference to Python. However (as almost no-one remembers today) he used it ''in contrast'' to Python.
 
I can define "duck typing". I can even define "duck typing in Python". And if you tell me first whether you think Python is, or is ''not'' duck typed, then I can explain what it means and how Python is (or is not, whichever you favour) following it. The term just has no consistent definition, or a definition that can be in any way illuminating in an article on Python.
 
[[w:Duck typing]] is beyond hope, but also beyond AfD. However we should not spread the confusion or nonsense further than it has already gone. The term should never be used around Python coders. [[User:Andy Dingley|Andy Dingley]] ([[User talk:Andy Dingley|talk]]) 21:36, 13 March 2015 (UTC)
 
:Disagree. [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 01:32, 15 March 2015 (UTC)
:: With what part? [[User:Andy Dingley|Andy Dingley]] ([[User talk:Andy Dingley|talk]]) 01:43, 15 March 2015 (UTC)
 
{{dedent}}
 
Hi. I'd like to interrupt and show this example.
 
<syntaxhighlight lang=python>
class duck:
def quack(self):
print("Quaaaaaack!")
 
class human:
def quack(self):
print("Fine...quack...happy?")
 
class dog:
def bark(self):
print("BARK!BARK!")
 
class cat:
def meow(self):
print("Meeeeeeeow.")
 
for i in (duck(), cat(), human(), dog()):
try:
i.quack()
except:
print("A %s cannot quack." % i.__class__.__name__)
</syntaxhighlight>
 
output:
Quaaaaaack!
A cat cannot quack.
Fine...quack...happy?
A dog cannot quack.
 
The above shows that <code>i</code> will act like a duck and <code>quack()</code> regardless of its class type and it will throw a graceful error if it cannot <code>quack()</code>. This leads me to believe that Python is pretty duck typed. I also disagree. --[[User:I8086|I8086]] ([[User talk:I8086|talk]]) 21:11, 15 March 2015 (UTC)
: Your example doesn't really illustrate the problem. We all know that this is how Python behaves. The question is, ''is this duck typing''? Per Martelli's original association of the term to a Python context, this ''isn't'' duck typing. Duck typing, following the spirit of the original expression "If it walks like a duck and quacks like a duck, then it's a duck" is based on judging a set of behaviours in order to assign an identity. This is not what Python does - Python ''avoids the need'' to deal with such identities, because behaviours (i.e. supported methods) are independent. In Python we just don't care about whether things ''are'' ducks or not, or even if they "can be treated as ducks", we simply work at the level of "Make it quack if it can", "Make it walk if it can" and then we leave it at that.
: The question here for this article is even simpler. If we recognise that "duck typing" is a useless term in software because there is no agreed meaning for it (can you cite a more authoritative source than Martelli?) and that the two meanings differ so far as to simply contradict each other, then does it help or hinder this article to include the term? [[User:Andy Dingley|Andy Dingley]] ([[User talk:Andy Dingley|talk]]) 22:54, 15 March 2015 (UTC)
 
:: Here's a definition straight from the [http://docs.python.org/3/glossary.html Python Documentation]:
 
:::A programming style which does not look at an object’s type to determine if it has the right interface; instead, the method or attribute is simply called or used (“If it looks like a duck and quacks like a duck, it must be a duck.”) By emphasizing interfaces rather than specific types, well-designed code improves its flexibility by allowing polymorphic substitution. Duck-typing avoids tests using type() or isinstance(). (Note, however, that duck-typing can be complemented with abstract base classes.) Instead, it typically employs hasattr() tests or EAFP programming.
 
:: This means you can call a method of any object while having EAFP (like the above example) in case you can't call that said method. So, along with that, I don't see why it should be removed; I find duck typing important. --[[User:I8086|I8086]] ([[User talk:I8086|talk]]) 01:11, 16 March 2015 (UTC)
 
== Hello world? ==
 
As you probably know, most programming languages on Wikipedia have a Hello World section. Any chance of adding it? The syntax is pretty simple: `print "Hello, world"` for Python 2.x and `print("Hello, World")` for python 3.x. I would love to add it myself, but I'm no Wikipedia editor. [[Special:Contributions/84.85.246.226|84.85.246.226]] ([[User talk:84.85.246.226|talk]]) 15:45, 31 March 2015 (UTC)
: No. What new facet would this explain about Python? Hello World is, by its nature, trivial. Trivial examples rarely demonstrate much. [[User:Andy Dingley|Andy Dingley]] ([[User talk:Andy Dingley|talk]]) 17:40, 31 March 2015 (UTC)
: Ok, sorry about that :) [[Special:Contributions/84.85.246.226|84.85.246.226]] ([[User talk:84.85.246.226|talk]]) 06:35, 1 April 2015 (UTC)
 
== Speed comparison ==
 
Pythonics find solutions without Java three times faster with Python.
Non-Pythonics can't write Pythonic. <small><span class="autosigned">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Wiki lofi|Wiki lofi]] ([[User talk:Wiki lofi|talk]] • [[Special:Contributions/Wiki lofi|contribs]]) 07:55, 25 August 2015 (UTC)</span></small><!-- Template:Unsigned --> <!--Autosigned by SineBot-->
 
== External links modified ==
 
Hello fellow Wikipedians,
 
I have just added archive links to {{plural:3|one external link|3 external links}} on [[Python (programming language)]]. Please take a moment to review [https://en.wikipedia.org/w/index.php?diff=prev&oldid=678093903 my edit]. If necessary, add {{tlx|cbignore}} after the link to keep me from modifying it. Alternatively, you can add {{tlx|nobots|deny{{=}}InternetArchiveBot}} to keep me off the page altogether. I made the following changes:
*Attempted to fix sourcing for https://www.python.org/dev/intro/
*Added archive https://web.archive.org/20140423121309/http://www.jasc.com/support/customercare/articles/psp9components.asp to http://www.jasc.com/support/customercare/articles/psp9components.asp
*Added archive https://web.archive.org/20121101045354/http://wiki.python.org:80/moin/PythonForArtificialIntelligence to https://wiki.python.org/moin/PythonForArtificialIntelligence
 
When you have finished reviewing my changes, please set the ''checked'' parameter below to '''true''' to let others know.
 
{{sourcecheck|checked=false}}
 
Cheers. —[[User:Cyberbot II|<sup style="color:green;font-family:Courier;">cyberbot II</sup>]]<small><sub style="margin-left:-14.9ex;color:green;font-family:Comic Sans MS;">[[User talk:Cyberbot II|<span style="color:green;">Talk to my owner</span>]]:Online</sub></small> 10:17, 27 August 2015 (UTC)
 
== There is no word about the best GUI builder: Qt_Designer. Why? ==
 
I had been struggling for years with terrible Tkinter, wxPython, BOA, Glide, etc. until I discovered [[PyQt]] with its fantastic VISUAL [[Qt_Designer]], which is free software. [[Special:Contributions/85.193.214.150|85.193.214.150]] ([[User talk:85.193.214.150|talk]]) 18:18, 12 October 2015 (UTC)
 
:If you can come up with a reliable, third-party reference (or two) stating this, then feel free to add it in. Although I would say terms like 'the best' and 'terrible' and 'fantastic' are quite subjective. There are also issues around licensing: PyQT has GPL but not LGPL, which may affect some uses/users.
: [[User:Peterl|peterl]] ([[User talk:Peterl|talk]]) 09:11, 13 October 2015 (UTC)