Talk:Python (programming language)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Good article Python (programming language) has been listed as one of the Engineering and technology good articles under the good article criteria. If you can improve it further, please do so. If it no longer meets these criteria, you can reassess it.
          This article is of interest to the following WikiProjects:
WikiProject Computing (Rated GA-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 GA  This article has been rated as GA-Class on the project's quality scale.
 Mid  This article has been rated as Mid-importance on the project's importance scale.
 
WikiProject Free Software / Software / Computing  (Rated GA-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject Free Software, a collaborative effort to improve the coverage of free software on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 GA  This article has been rated as GA-Class on the project's quality scale.
 Mid  This article has been rated as Mid-importance on the project's importance scale.
Taskforce icon
This article is supported by WikiProject Software.
Taskforce icon
This article is supported by WikiProject Computing.
 
WikiProject Computer science (Rated GA-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 GA  This article has been rated as GA-Class on the project's quality scale.
 Mid  This article has been rated as Mid-importance on the project's importance scale.
 

Archives
1, 2, 3, 4, 5, 6, 7, 8
Threads older than 3 months may be archived by MiszaBot I.

Contents

Weasel? [edit]

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. peterl (talk) 06:17, 22 August 2012 (UTC)

“Python syntax clear” (neutrality issue) [edit]

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:

or ugly<ref>[http://c2.com/cgi/wiki?PythonProblems Python Problems]: “<cite>Underscores for privates members are ugly</cite>” (among other comments)</ref>

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. --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. --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. 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 [1] which is where we ended up up with 'said to be' rather than 'is'.
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? --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. 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

if (int a=call()) output(a); else output(!a);

. 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. 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'. 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'. 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? 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. 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. peterl (talk) 22:59, 11 April 2013 (UTC)

Some code samples are needed [edit]

Importing a good piece of advice from 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. Shlomif (talk) 18:07, 26 November 2012 (UTC)

Interpreted vs compiled [edit]

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 here and here, in the reference implementation a Python program is compiled into bytecode --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.--91.114.185.145 (talk) 13:06, 28 January 2013 (UTC)

@User:Carbo1200 I see my remark has been taken into account, thanks --195.13.33.18 (talk) 14:03, 28 January 2013 (UTC)

History wrong [edit]

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. 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[2] according to Guido van Rossom. What is the dispute? --Kim D. Petersen (talk) 05:03, 3 March 2013 (UTC)