Commit Graph

153 Commits

Author SHA1 Message Date
Denis Gladkikh
3e93c5e5f4 Update python.html.markdown 2015-09-01 10:23:31 -07:00
Denis Gladkikh
a24e5ef7a1 Python: add finally and with statements
https://docs.python.org/2/tutorial/errors.html
2015-09-01 09:27:40 -07:00
Al Sweigart
8a968db2bc Added links to the free book "Automate the Boring Stuff with Python" to the "Free Online" section. 2015-07-23 11:24:40 -07:00
Mark Miller
d995a0ae27 Changed %s formatting to {n} style.
If line 117 is accurate, then {n} style string formatting is the preferred style, and it should be reflected in the examples.
2015-07-16 16:45:25 -05:00
Michael Herman
c6caa7664c Update python.html.markdown 2015-07-05 21:12:12 -06:00
Michael Herman
92096a65ed python/en - added two resources 2015-07-05 08:35:31 -06:00
Rinoc Johnson
5ebe2dcb6e Clarify wording for list reversal. 2015-04-30 19:31:38 -04:00
Rinoc Johnson
e13e00945d Fix Python typo. 2015-04-30 17:56:01 -04:00
Sriram Sundarraj
c2963cdc31 [python/en] Removed python3 print. 2015-04-24 23:29:01 +05:30
Sriram Sundarraj
6b6342a7dc [python/en] Moved to default python2 print statements. 2015-04-24 22:57:33 +05:30
Sriram Sundarraj
98aa4ef43c [python/en] Added range(start, stop). 2015-04-24 01:50:17 +05:30
Sriram Sundarraj
2ad26dd44a [python/en] Adding strings without + added. 2015-04-23 01:30:40 +05:30
suuuzi
22a0f44e64 Refering Python3 tutorial link 2015-02-04 15:36:20 -02:00
Louie Dinh
28fcbc8e1c Fix typo 2014-12-23 11:23:22 -08:00
Doug Ilijev
d886036b59 [python/en] Fix 80 col limit and clarify a few points. 2014-11-17 01:26:19 -06:00
Jack Hooper
4d85f161d8 More apostrophe fixes
I hate to be that guy, but... I found a couple more.
2014-11-12 02:03:50 +11:00
Jack Hooper
0429c31d6d Updated note regarding Python 3 tutorial. 2014-11-12 00:30:19 +11:00
Jack Hooper
0698ed27c1 There's no apostrophe in 90s
Apostrophes are for indicating an abbreviation or for denoting possession. '90s' is merely a plural. It is an abbreviation of 1990s, so technically it ought to be '90s, but for all intents and purposes this is optional.
2014-11-12 00:28:03 +11:00
Levi Bostian
132823d274 Merge pull request #795 from marvelousNinja/plus_signs_in_python
[python/en] Removed unnecessary plus signs in bool operators section
2014-10-09 20:07:57 -05:00
Andre Polykanine A.K.A. Menelion Elensúlë
a2043f3adb Gosh, what happened to me today?( Fixed the left bracket 2014-10-09 23:22:24 +03:00
Andre Polykanine A.K.A. Menelion Elensúlë
68c9aed134 Corrected as per @iirelu's comment 2014-10-09 23:06:24 +03:00
Andre Polykanine A.K.A. Menelion Elensúlë
39d8753d52 [python/en] Adding exponentiation operator 2014-10-09 22:49:47 +03:00
Alexander Sologub
6629b5cd39 [python/en] Removed unnecessary plus signs in bool operators section 2014-10-09 19:50:55 +03:00
Steven Basart
81b4f49e99 [python/en] Added Bool operators
Modified Bool operators
2014-09-07 19:32:46 -04:00
Steven Basart
62f4c0de22 [python/en] Added Bool operators
Bool operators
2014-09-07 19:22:01 -04:00
Evgeniy Ginzburg
cb3217fc35 Merge https://github.com/adambard/learnxinyminutes-docs
Added two minor changes in integer division to make it clear
2014-08-06 23:45:44 +03:00
Evgeniy Ginzburg
daf83c9123 aded negative integer division same as in python3 2014-08-06 23:43:37 +03:00
Mikael E. Wikner
472142d11f Squashed commits to prepare for merge
moved underscore for range variable, added comment

renamed parameter in beg decorator

added comment about double underscores

Update python.html.markdown
2014-08-06 00:10:52 +02:00
Shashwat986
65a1b6279f Update python.html.markdown
range() is not a generator in python 2.x
2014-08-05 01:06:54 +05:30
Shashwat986
e6a289be49 Update python.html.markdown
Added more details to try/except section.
2014-08-02 19:37:28 +05:30
Steven Basart
0dcc5640b6 [python/en] added int div, modulo, and scoping
Added integer or truncation division, the modulo operator which were missing from operators section. Added function scoping in the functions section.
2014-07-13 14:52:31 -04:00
Steven Basart
2a9a4f39ba [python/en] added int div, modulo, and scoping
Added integer or truncation division, the modulo operator which were missing from operators section. Added function scoping in the functions section.
2014-07-13 14:51:34 -04:00
Juan David Pastas
fce8598a74 Python: clearer add lists note. 2014-05-01 13:53:01 -05:00
Sam Dodrill
777c333ff0 Remove references to hash and hashtag in favor of number symbol 2014-04-14 11:15:08 -07:00
Guillermo Garza
7db61d1ce1 Modify python to be pep8 compliant
This mostly adds spaces.
2014-03-21 18:14:55 -05:00
Mark Whiting
da3b7c3520 Better explanation of list slices
Step size and list slice syntax was not quite clear. 

Upon seeing li[::-1] as it was previously, I was not sure what this really meant so I looked it up and found that this section of the guide may benefit from more explanation.
2014-02-17 21:07:29 -05:00
charalambosp
3233394cd5 fix section number 2014-02-16 18:37:02 +00:00
charalambosp
550b9c9f2e generators & decorators 2014-02-16 18:36:09 +00:00
Adam Brenecki
1e60055977 [python] == doesn't coerce types; use bool() to demonstrate truthiness instead. Closes #418. 2013-11-26 18:12:53 +10:30
Piotr Migdał
f5c9b80377 added an online intro into Python for scientists 2013-11-19 17:17:28 +01:00
Amin Bandali
eb8afb2ff2 reverting a list using slices 2013-11-11 23:17:34 -05:00
Adam Brenecki
de36671ac1 [python] Change to print function, as per #119 2013-09-20 19:49:38 +09:30
Adam Brenecki
6d8ffb19b4 [python] Fix typo in comment, as per #265 2013-09-20 19:33:39 +09:30
Adam Brenecki
1405dc6387 [python] Clarify setdefault, as per #234 2013-09-20 19:32:58 +09:30
Haydar Kulekci
de027ddf9e regular quotes instead of `. 2013-08-23 09:54:21 +03:00
Haydar Kulekci
8c1a1d8a7b some python keywords, which are in comments, enclosed in quotation marks to become clear (understandable) 2013-08-23 00:06:47 +03:00
michaelstewart
10ffa5a781 Added an apostrophe to Its 2013-08-08 18:49:45 +10:00
cssmagic
0dff3a936c Fix tiny typos. 2013-08-07 22:48:11 +08:00
Louie Dinh
5617b28048 Expand on References. Add Books. 2013-08-05 17:54:50 -07:00
ldinh
d2f0d8222e Fix typo 2013-08-05 17:42:38 -07:00
Adam
9ad61b5586 Authors -> Contributors 2013-07-03 22:59:13 -07:00
Adam Bard
7ec9e44ef0 Merge pull request #99 from adelq/master
Fix minor grammatical error on python page
2013-07-03 15:31:18 -07:00
Adel Qalieh
2954fc9bb5 Fix grammatical errors 2013-07-03 18:20:03 -04:00
Adam
aa66a13d49 Small fix in python 2013-07-03 08:49:29 -07:00
Yaser Alraddadi
178eaad9df Added dir() function
Added dir() function
2013-07-03 01:33:48 +03:00
Louie Dinh
0e0fed1e30 Fix typo 2013-07-01 11:50:41 -07:00
Louie Dinh
83900dc504 Tighten up py doc a bit 2013-07-01 10:32:42 -07:00
Michael Lee
1665dde88a Incorporated feedback, and pulled in changes from the master trunk. 2013-07-01 06:31:28 -07:00
Michael Lee
c747807558 Incorporated feedback from lodin/adambard/others
Changes:

- Added a few lines on using "is" to compare object identity.
- Removed example about lists containing arbitrary values.
- Removed example about assigning lambdas to variables.
- Removed example about dictionary comprehensions.
- Removed the additional explanation about 'self'
- Added a clarification on modules.
2013-07-01 06:21:03 -07:00
Michael Lee
cc3dc30518 Added a few lines about truthiness, how lists can contain arbitrary data types, how you can unpack both tuples and lists, using ange, assigning lambdas to variables, dictionary comprehensions, modules, and links to more info about the standard library. 2013-07-01 06:13:34 -07:00
lodin
2431545594 Merge pull request #22 from NickPresta/patch-1
Python: Removing the bit about commas and exceptions.
2013-06-30 16:22:54 -07:00
lodin
ec6ffed3c9 Add hitchhiker's guide to python. 2013-06-30 16:18:20 -07:00
lodin
4d501a48fc Fix typo. 2013-06-30 16:02:37 -07:00
ldinh
868b259db1 Change formatting 2013-06-30 15:47:56 -07:00
ldinh
34a9f1aab1 Add line breaks 2013-06-30 15:36:37 -07:00
ldinh
ae5060a4bf Add to Python reference material 2013-06-30 15:35:20 -07:00
ldinh
77672e7891 Fix some inconsistencies so that the doc can be read top to bottom 2013-06-30 15:17:41 -07:00
Adam
ba55f6fcaa Fix whitespace 2013-06-29 23:13:53 -07:00
Michael Lee
79c26e6679 Added a few lines about truthiness, how lists can contain arbitrary data types, how you can unpack both tuples and lists, using ange, assigning lambdas to variables, dictionary comprehensions, modules, and links to more info about the standard library. 2013-06-29 21:35:11 -07:00
Adam
83aeecb68a Added filename parameter 2013-06-29 20:19:14 -07:00
Leah Hanson
03461ad0de tiny typo fix in python
we -> be
2013-06-29 16:21:55 -04:00
Juraj Bubniak
c51d0ec1a7 python set literals should be separated by comma 2013-06-29 08:22:19 +02:00
Adam
a6bcf5f8d7 Fixes #16: Added new-style string formatting 2013-06-28 21:20:08 -07:00
Adam
4789dd1097 Fixes #26: triple-quoted strings are identified as such, not as comments 2013-06-28 21:17:29 -07:00
Adam
04cedf9844 Fixes #15: Set literals 2013-06-28 21:15:50 -07:00
Adam
e1424579e7 Fixes #14: Clarified if-as-expression wording in python tut 2013-06-28 21:11:54 -07:00
Adam Bard
4f50dedd5c Merge pull request #23 from brianr/patch-1
Use consistent example for demonstrating integer vs. float division
2013-06-28 19:56:09 -07:00
Adam
86273dec2f Updates 2013-06-28 17:21:24 -07:00
Adam Bard
8af9965751 Merge pull request #27 from lodin/master
Adding contact for feedback =]
2013-06-28 17:21:00 -07:00
Jeff Carpenter
e2fe947b79 Reverse "omit the beginning|end"
While reading I thought this might be a mistake (or I'm just going crazy).
2013-06-28 17:11:32 -07:00
Brian Rue
cf98f74d61 Use consistent example for demonstrating integer vs. float division 2013-06-28 16:56:42 -07:00
Louie Dinh
199e037682 Add contact info to python doc 2013-06-28 16:32:26 -07:00
Louie Dinh
a87a1ea3fd Merge remote-tracking branch 'upstream/master' 2013-06-28 16:29:46 -07:00
Brian Rue
6f255a5e62 Use consistent example for demonstrating integer vs. float division
I had to do a decent amount of mental math to figure out the old example (11 / 4 => 2).

This one (5 / 2 => 2) is easier, and makes the difference vs. float division (5.0 / 2.0 => 2.5) easier to spot.
2013-06-28 15:55:23 -07:00
Nick Presta
6cfb00d106 Removing the bit about commas and exceptions. 2013-06-28 18:34:30 -04:00
Adam Bard
63b8f04c57 Merge pull request #17 from mrshankly/patch-1
Corrected the last element of li in the lists explanation
2013-06-28 14:02:45 -07:00
Kyle Partridge
fe5f72d868 added some clarification on the default value for dictionary.get 2013-06-28 13:55:16 -07:00
mrshankly
f7352567f4 Corrected the last element of li in the lists explanation. 2013-06-28 21:29:03 +01:00
Adam
2e805c8c02 Updates 2013-06-28 12:59:45 -07:00
Liteye
9e17e87885 add conditional expressions, get and setdefault for dictionary and a little tip about fuction calling.
Signed-off-by: Liteye <yelite958@gmail.com>
2013-06-28 22:59:25 +08:00
js.sevestre
ff14723ee6 Add inequality and chained comparisons 2013-06-28 09:52:39 +02:00
Adam
e37b1745a7 Fixed a typo 2013-06-27 18:27:14 -07:00
Adam
1fed90cba6 Fixed any syntax errors 2013-06-27 18:22:30 -07:00
Adam
d164d5a56e Minor fixes to python doc 2013-06-27 18:18:05 -07:00
Julia Evans
26d6fe55e3 Fix typo
8-1 is 7 =)
2013-06-27 14:35:33 -04:00
Louie Dinh
cbb2ef1197 Remove however in unpacking commenting. It's confusing 2013-06-27 10:57:49 -07:00
Adam
2e9f5a642b Small edits to python version 2013-06-27 10:53:43 -07:00
Louie Dinh
445041776c Added tuples, floats and slice syntax. A few minor edits too 2013-06-27 10:36:57 -07:00
Adam
31c16d7eb9 Minor updates 2013-06-27 09:35:59 -07:00
ldinh
360512e5a3 fix typo 2013-06-27 00:45:59 -07:00