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).
MiszaBot I (talk | contribs)
m Archiving 2 thread(s) from Talk:Python (programming language).
Line 106:
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)