First commit of partial RosettaCode contents.
Pushing this for testing purposes. Lots of work still needed.
This commit is contained in:
commit
1e05ecd7ee
781 changed files with 9080 additions and 0 deletions
31
Lang/Python/0DESCRIPTION
Normal file
31
Lang/Python/0DESCRIPTION
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{{language
|
||||
|exec=interpreted
|
||||
|site=http://www.python.org
|
||||
|strength=strong
|
||||
|safety=safe
|
||||
|express=implicit
|
||||
|checking=dynamic
|
||||
|parampass=value
|
||||
|gc=yes
|
||||
|LCT=yes
|
||||
|bnf=http://docs.python.org/py3k/reference/grammar.html}}{{language programming paradigm|Dynamic}}{{language programming paradigm|Object-oriented}}{{codepad}}From the official [http://www.python.org Python] website: "Python is a programming language that lets you work more quickly and integrate your systems more effectively. You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs."
|
||||
|
||||
It is easy to create clean bug-free programs in Python due to the motto: "Errors should never pass silently." Python is an [[wp:Interpreter (computing)|interpreter]]. Python source files (.py files) are typically compiled to an intermediate [[bytecode]] language (.pyc files) and executed by a Python Virtual Machine.
|
||||
|
||||
===Notes===
|
||||
Because Python uses whitespace for structure, do not format long code examples with leading whitespace, instead use <code><nowiki><pre></pre></nowiki></code> tags, or, preferably, <code><nowiki><lang python></lang></nowiki></code> tags. This will make it easier to copy code into and out of the wiki. Example:
|
||||
:<lang python>print 'this line must not have leading indentation!'
|
||||
if True:
|
||||
print 'example: ', foo(3), len(bar)</lang>
|
||||
|
||||
Some Python examples may deviate from idiomatic Python because they may be written to work in Python 3.X as well as Python 2.X environments. This includes doing things like:
|
||||
* Using brackets in print statements/functions of one expression.
|
||||
* Using zip and not izip; keys(), values(), items() and not their iter- forms.
|
||||
* Checking for raw_input and setting raw_input to input if not found.
|
||||
* Conditionally importing reduce if it is not found.
|
||||
This style is not a requirement for Python code on RC, but it may be in use and should not necessarily be 'corrected' if found in examples.
|
||||
|
||||
The command line is often used in Python for short pieces of code, and so, again; examples showing such use are not incorrect and may be left.
|
||||
|
||||
==See Also==
|
||||
* [[wp:python_(programming_language)|Wikipedia: Python]]
|
||||
1
Lang/Python/99_Bottles_of_Beer
Symbolic link
1
Lang/Python/99_Bottles_of_Beer
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/99_Bottles_of_Beer/Python
|
||||
1
Lang/Python/Anagrams
Symbolic link
1
Lang/Python/Anagrams
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/Anagrams/Python
|
||||
1
Lang/Python/Bulls_and_cows
Symbolic link
1
Lang/Python/Bulls_and_cows
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/Bulls_and_cows/Python
|
||||
1
Lang/Python/Comments
Symbolic link
1
Lang/Python/Comments
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/Comments/Python
|
||||
1
Lang/Python/Death_Star
Symbolic link
1
Lang/Python/Death_Star
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/Death_Star/Python
|
||||
1
Lang/Python/Entropy
Symbolic link
1
Lang/Python/Entropy
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/Entropy/Python
|
||||
1
Lang/Python/FizzBuzz
Symbolic link
1
Lang/Python/FizzBuzz
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/FizzBuzz/Python
|
||||
1
Lang/Python/Infinity
Symbolic link
1
Lang/Python/Infinity
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/Infinity/Python
|
||||
1
Lang/Python/JSON
Symbolic link
1
Lang/Python/JSON
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/JSON/Python
|
||||
1
Lang/Python/Knuth_shuffle
Symbolic link
1
Lang/Python/Knuth_shuffle
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/Knuth_shuffle/Python
|
||||
1
Lang/Python/Narcissist
Symbolic link
1
Lang/Python/Narcissist
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/Narcissist/Python
|
||||
1
Lang/Python/Ordered_words
Symbolic link
1
Lang/Python/Ordered_words
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/Ordered_words/Python
|
||||
1
Lang/Python/Pi
Symbolic link
1
Lang/Python/Pi
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/Pi/Python
|
||||
1
Lang/Python/Quine
Symbolic link
1
Lang/Python/Quine
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/Quine/Python
|
||||
1
Lang/Python/Search_a_list
Symbolic link
1
Lang/Python/Search_a_list
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../Task/Search_a_list/Python
|
||||
Loading…
Add table
Add a link
Reference in a new issue