[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 2e6798f35260ff90129861ef1f289ac40c0396c2 by Miss Islington (bot) 
in branch '3.10':
bpo-46270: Describe the `in` and `not in` operators as membership tests. 
(GH-30504) (GH-30509)
https://github.com/python/cpython/commit/2e6798f35260ff90129861ef1f289ac40c0396c2


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-09 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-09 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +28713
pull_request: https://github.com/python/cpython/pull/30509

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset d24cd49acb25c36db31893b84d0ca4fe2f373b94 by Raymond Hettinger in 
branch 'main':
bpo-46270: Describe the `in` and `not in` operators as membership tests. 
(GH-30504)
https://github.com/python/cpython/commit/d24cd49acb25c36db31893b84d0ca4fe2f373b94


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-09 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
keywords: +patch
pull_requests: +28709
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30504

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-06 Thread Jan


Jan  added the comment:

Sounds reasonable.

--
resolution: works for me -> fixed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Container is correct.  Containers are defined as being anything that supports 
the "in" and "not in" operators.  That includes sequences (str, list, tuple, 
bytes, bytearray), mappings (dict, ChainMap, defaultdict), and sets (frozenset 
and set).

It doesn't matter that the word container comes up later.  At this point in the 
tutorial we tend to have a number of forward or references.  Our tutorial is 
more a guided walkthrough with examples rather than a series of sequential 
definitions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-05 Thread Jan


Jan  added the comment:

I really like this solution because it mentions the buzz word "membership". But 
I would change "container" to "sequence" because the term "container" doesn't 
appear in chapter 5, "sequence" on the other hand multiple times. My proposal:

"The comparison operators `in` and `not in` are membership tests that determine 
whether a value is in (or not in) a sequence."

--
resolution:  -> works for me

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-05 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

It may seem weird, but a "membership operator" is a kind of "comparison 
operator".¹  They can even participate in chaining, 'a < b in s < c` is 
equivalent to `(a < b) and (b in s) and (b < c)`. 

I'm propose this new wording to mention the concept of "membership":

"The comparison operators `in` and `not in` are membership tests that determine 
whether a value is in (or not in) a container."

¹ https://docs.python.org/3/reference/expressions.html#comparisons

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-05 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-05 Thread Jan


New submission from Jan :

In chapter 5.7 in the official Python tutorial (see: 
https://docs.python.org/3/tutorial/datastructures.html), there is the following 
paragraph:

"The comparison operators in and not in check whether a value occurs (does not 
occur) in a sequence. The operators is and is not compare whether two objects 
are really the same object. All comparison operators have the same priority, 
which is lower than that of all numerical operators."

I believe that "in" and "not in" are rather membership operators than 
comparison operators. I think a differentiation of operator types in one or two 
sentences would be helpful.

--
assignee: docs@python
components: Documentation
messages: 409782
nosy: docs@python, realjanpaulus
priority: normal
severity: normal
status: open
title: Comparison operators in Python Tutorial 5.7
type: enhancement
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue46270>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43034] Python tutorial misleads users about floor division behavior

2021-07-08 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Possibly:

5//2  # 2
-5//2 # -3

Would be easier to understand.

--
nosy: +andrei.avk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: [ANN] Free Python tutorial with exercises, cscx.org

2021-04-13 Thread Russell via Python-list
Jach Feng  wrote:
 
> Is there any reason a student/beginner learn Python now start from Python2?
> 
> --Jach

Only if you want a job porting python2 to python3. Python 2.x is
officially End Of Life.

-- 
rust
0x68caecc97f6a90122e51c0692c88d9cb6b58a3dc
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [ANN] Free Python tutorial with exercises, cscx.org

2021-04-07 Thread Jach Feng
Rudy Matela 在 2021年4月1日 星期四下午11:13:03 [UTC+8] 的信中寫道:
> Hello python-list members, 
> 
> I would like to announce the following educational project: 
> 
> Computer Science by Example https://cscx.org/ is a collection of short 
> programming exercises. The site can automatically grade students' 
> solutions and it accepts submissions in Python. 
> 
> The exercises start simple, then increase in difficulty and complexity 
> gradually. Here are some examples: 
> 
> * Print "Hello, World!": https://cscx.org/hello 
> * Add two numbers: https://cscx.org/add1 
> * Compute the factorial of a number: https://cscx.org/factorial 
> * Compute the GCD of two numbers: https://cscx.org/gcd 
> * Solve the change-making problem: https://cscx.org/cash 
> 
> The website has a tutorial section covering Python's basics. 
> 
> I tried to make the content easy to use by instructors/lecturers, feel free 
> to use this with your students. The backend of the website is open source 
> and you can find it on 
> https://github.com/rudymatela/udge 
> 
> -- Rudy

Is there any reason a student/beginner learn Python now start from Python2?

--Jach
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [ANN] Free Python tutorial with exercises, cscx.org

2021-04-06 Thread Rudy Matela
On Fri, Apr 02, 2021 at 05:00:40AM +1100, Chris Angelico wrote:
> On Fri, Apr 2, 2021 at 2:14 AM Rudy Matela  wrote:
> > Computer Science by Example https://cscx.org/ is a collection of short
> > programming exercises.  The site can automatically grade students'
> > solutions and it accepts submissions in Python.
> 
> What versions of Python does it support? The setup page is not clear.

It supports Python 2 and 3.  When you submit solutions to the exercises,
the system looks at the hashbang (#!) to check whether you are using
Python 2 or 3:

#!/usr/bin/env python2

or

#!/usr/bin/env python3

When none of these are present it defaults to Python 3.

The examples in the tutorial section (https://cscx.org/programming-basics)
are done so that they are compatible with both versions of the language.
So if you have either 2 or 3, you'll be able to follow the tutorial and
exercises.

I'll add this clarification in the setup section and the FAQ later this
week.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [ANN] Free Python tutorial with exercises, cscx.org

2021-04-01 Thread Chris Angelico
On Fri, Apr 2, 2021 at 2:14 AM Rudy Matela  wrote:
>
> Hello python-list members,
>
> I would like to announce the following educational project:
>
> Computer Science by Example https://cscx.org/ is a collection of short
> programming exercises.  The site can automatically grade students'
> solutions and it accepts submissions in Python.
>

What versions of Python does it support? The setup page is not clear.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[ANN] Free Python tutorial with exercises, cscx.org

2021-04-01 Thread Rudy Matela
Hello python-list members,

I would like to announce the following educational project:

Computer Science by Example https://cscx.org/ is a collection of short
programming exercises.  The site can automatically grade students'
solutions and it accepts submissions in Python.

The exercises start simple, then increase in difficulty and complexity
gradually.  Here are some examples:

* Print "Hello, World!": https://cscx.org/hello
* Add two numbers: https://cscx.org/add1
* Compute the factorial of a number: https://cscx.org/factorial
* Compute the GCD of two numbers: https://cscx.org/gcd
* Solve the change-making problem: https://cscx.org/cash

The website has a tutorial section covering Python's basics.

I tried to make the content easy to use by instructors/lecturers, feel free
to use this with your students.  The backend of the website is open source
and you can find it on
https://github.com/rudymatela/udge

-- Rudy
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43056] Use of dicts in 4.2 and 4.7 of Python tutorial a bit confusing

2021-02-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The link to https://docs.python.org/3.9/library/stdtypes.html#typesmapping
 isn't a forward reference. It is a link to the main docs which is entirely 
appropriate and likely the only way a beginner would find that section.

I concur with Terry that this should be closed.  I've no evidence of an actual 
user ever having been confused by this presentation.

--
nosy: +rhettinger
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43056] Use of dicts in 4.2 and 4.7 of Python tutorial a bit confusing

2021-01-29 Thread Jesse Silverman


Jesse Silverman  added the comment:

Agreed with the exception that I'd like to review whether the forward reference 
to dict in the tutorial might be better suited to people working thru the 
tutorial than the current forward reference to the real docs.

I got to take a look at Eric Matthes' excellent "Python Crash Course".  He 
avoids this by treating function definitions only after introducing both tuples 
and dicts, rather than together with simple control flow within a function.  
That would clearly be a re-org that is way out of scope of a bug report.

So, if someone compares the potential forward reference to the dict section of 
the tutorial rather than the current forward reference to the language 
reference in light of where the tutorial audience is expected to be at when 
reading this section, I am good with closing it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43034] Python tutorial misleads users about floor division behavior

2021-01-29 Thread Jesse Silverman


Jesse Silverman  added the comment:

I understand and agree with both comments.
I will confirm that a substantial number of people think -17 // 3 yields -5.0, 
so when I saw this I wondered if it reinforced that common misconception.

I was curious enough to not just confirm in the actual docs not only that -17 
// 3 == -6.0 but learned why it does so.

I would be happy to see any of Terry's three suggestions added, with the first 
one adding the most bang for the buck (if someone is surprised to see -6.0 
there, they can go look up why).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43056] Use of dicts in 4.2 and 4.7 of Python tutorial a bit confusing

2021-01-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

For 4.2, the point is the '.copy()' versus the 'active_users' copy.  I think a 
real beginner would, or should, ignore any other details not immediately 
familiar.  

4.7.2 Keyword arguments.  It is simply a fact that including the full 
discussion here requires the forward references.  I think splitting the 
discussion and moving this part somewhere later would be worse.  Some will not 
be able to "follow the tutorial in sequence".  It is not a novel.

I think you should close this.  It makes observations but does not have any 
concrete suggestions for improvements, and unlike your other posts, I don't see 
that it might lead to any.

--
nosy: +terry.reedy
title: Use of dicts in sections 4.2 and 4.7 of Python tutorial a bit confusing 
-> Use of dicts in 4.2 and 4.7 of Python tutorial a bit confusing

___
Python tracker 
<https://bugs.python.org/issue43056>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43034] Python tutorial misleads users about floor division behavior

2021-01-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

-17/3 = -5.667 = -6.0 + .333.  It is the latter 
fraction that gets discarded.

However, this is a frequent source of confusion.  How about adding 

>>> -17 // 3
-6
>>> -17 % 3
1
>>> -6 * 3 + 1
-17

to illustrate what we mean, without footnote or additional text.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43056] Use of dicts in sections 4.2 and 4.7 of Python tutorial a bit confusing

2021-01-28 Thread Jesse Silverman


New submission from Jesse Silverman :

The Python tutorial was not my first introduction to Python, but I see things 
in sections 4.2 and 4.7 that likely would have confused me a lot if it was.

In 4.2 near the end, we have great advice about how to avoid problems with 
modifying a collection while iterating thru it.

Unfortunately, it both makes use of a dict despite not having introduced it 
before at all within the tutorial (I wasn't shocked because it was NOT my first 
introduction to Python) and in fact, the .items() method which is beautifully 
explained in section 5.6, which hasn't been read yet.

I got thru it a bit shakily, and in a reference, rather than an introductory 
tutorial, it is quite literally impossible to present everything in a strict 
sequence, but I would definitely have been thrown for a loop if it was actually 
my first introduction to Python.

All was good again until I got to section 4.7.2, where I was again glad I had 
previously consumed tutorial materials concerning dict.  There is a forward 
reference to:
https://docs.python.org/3.9/library/stdtypes.html#typesmapping

Which every Python programmer should undoubtedly be familiar with eventually, 
but "why not?" to the more novice-friendly:
https://docs.python.org/3.9/tutorial/datastructures.html#dictionaries

The forward reference from this section to tuples in section 5 of the tutorial 
suggests that this might have been appropriate as well.

The dict, the tuple and parameter passing are all very basic topics indeed, but 
I would have found 4.7 very rough going if I had no prior exposure to dict and 
tuple.

This isn't a complaint demanding a refund for the cost of the tutorial, so much 
as an indication of where I think true novices attempting to follow the 
tutorial in sequence would likely be thrown for a loop.  I understand there is 
a healthy ecosystem of free and paid introductory tutorial material for Python, 
as evidenced by the fact that I was only working thru the tutorial just now, 
having been referred to it as a pre-req for other material I will be moving on 
to soon.

--
assignee: docs@python
components: Documentation
messages: 385870
nosy: docs@python, jessevsilverman
priority: normal
severity: normal
status: open
title: Use of dicts in sections 4.2 and 4.7 of Python tutorial a bit confusing
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43056>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43034] Python tutorial misleads users about floor division behavior

2021-01-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The first section of the tutorial isn't the right place to go into these 
details.  The point of the section is to have a basic introduction to the 
interactive prompt.  It is intensionally gentle and lightweight.

It isn't the purpose of the tutorial to document complete semantics and corner 
cases.  We leave that for the language reference or for coverage of specific 
types in the library reference.  See footnote (1) in the operator table at 
https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex 
.

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43043] Python tutorial could make rules for default argument definition clearer

2021-01-27 Thread Jesse Silverman


New submission from Jesse Silverman :

I love the tutorial, but have been pointing out things I only knew from brutal 
experience, other tutorials, reasoning from other languages I know better, or 
looking things up.  I only mention them if they seem in scope and at the same 
level of the material which is presented.

Regarding 4.7.1. Default Argument Values of the excellent Python tutorial:

I guessed that I would see the behavior shown below from my understanding of 
default arguments in several other languages.  I did not read anything in this 
tutorial section that would lead me to conclude this, and other things 
mentioned in this section are neither much more or less subtle, more or less 
obvious, or more or less important.

PS F:\PythonCode> py VarArgs.py
  File "F:\PythonCode\VarArgs.py", line 1
def varArgs(quote, footnote='', times):
 ^
SyntaxError: non-default argument follows default argument

Most introductions to default argument definition in other languages go out of 
their way to highlight that the default parameters can be only the last N of 
them, and that all required ones must come first.
Python is intended to be accessible to people no more clever than the other 
languages intend, so tho it seems obvious to me that they must only come after 
all required arguments, I remember when it was not obvious (and fortunately the 
tutorials I read in the past for other languages belabored the point).

The explanatory text of:
giving one of the optional arguments: ask_ok('OK to overwrite the file?', 2)

as it merely says "one of", rather than "the first of" led me to wonder if 
Python was somehow more flexible/better at mind-reading than the languages I 
already know well that require all default args to be trailing, and to only let 
you default the last one, two, or ... N.  The results of the experiment shown 
above demonstrate it is similar to the behavior in other languages in this 
regard.

I deeply appreciate the information about when the default arguments get 
evaluated, which is highly relevant and is not something I would have picked up 
on from other languages I've used.

A simple line stating that "any default arguments must follow any required 
arguments in the definition" and something like "on calls, optional arguments 
may only be omitted from the end of the parameter list, they can't simply be 
skipped" would be awesome.

I am not sure whether or not this is made perfectly clear in the next section, 
which has a lot of other new and interesting ideas flying around in it as well, 
besides this one.

--
assignee: docs@python
components: Documentation
messages: 385813
nosy: docs@python, jessevsilverman
priority: normal
severity: normal
status: open
title: Python tutorial could make rules for default argument definition clearer
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43043>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43034] Python tutorial misleads users about floor division behavior

2021-01-26 Thread Jesse Silverman


New submission from Jesse Silverman :

I had never worked thru the Python tutorial, it's kind of awesome.

I noticed multiple independent presenters incorrectly describe the behavior of 
floor division when the signs of the operands don't match.  Not just sloppy 
ones, some who are usually pretty careful -- people forget.  I found it odd.

Today I read:
https://docs.python.org/3.9/tutorial/introduction.html#using-python-as-a-calculator
'Division (/) always returns a float. To do floor division and get an integer 
result (discarding any fractional result) you can use the // operator; to 
calculate the remainder you can use %:'

I know what they mean (there will never be a non-zero fractional component in 
the result) however, stating that it "discards any fraction result" explicitly 
suggests that it will round towards zero for all results.  The name of the 
operator tells us the true story, as does a test, it rounds towards negative 
infinity for all results.

Hopefully all the people using Python to treat cancer, fly to Mars and run 
power plants know what the behavior is.  However, anecdotally, I have seen 
evidence that generally cautious, fairly-detail oriented programmers seem to 
forget the details of the behavior, this is one place in the docs from which 
many people first learn about the floor division operator and this page would 
lead me to believe it operates differently than it does in reality.

If the words right there don't get changed, or the example of -10/3 doesn't get 
added, would this be a good excuse for a third footnote?  I would actually wish 
for both the wording to be changed and to show an example like -10 / 3, tho 
admittedly I came from an Engineering background so I am always worried 
someone's going to blow up somewhere...

Deepest regards for everyone who gets to regularly close the complaints about 
floor division working as designed and documented -- but not quite documented 
on this page which more people may read than others covering the operator.

--
assignee: docs@python
components: Documentation
messages: 385746
nosy: docs@python, jessevsilverman
priority: normal
severity: normal
status: open
title: Python tutorial misleads users about floor division behavior
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43034>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-24 Thread Борис Верховский

Борис Верховский  added the comment:

You changed "control flow statements" to "flow control statements", which is an 
unrelated concept.

--
nosy: +boris

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-18 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-18 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset c47c8ba2969c9faf1c036b3dc4b0a5cf0d3aa0cc by Eric V. Smith (Miss 
Islington (bot)) in branch '2.7':
bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16236)
https://github.com/python/cpython/commit/c47c8ba2969c9faf1c036b3dc4b0a5cf0d3aa0cc


--

___
Python tracker 
<https://bugs.python.org/issue37904>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-18 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 8b907a8875d1b22d8f060dee9430cc82d471e86b by Eric V. Smith (Miss 
Islington (bot)) in branch '3.7':
bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16235)
https://github.com/python/cpython/commit/8b907a8875d1b22d8f060dee9430cc82d471e86b


--

___
Python tracker 
<https://bugs.python.org/issue37904>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-18 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 7a2f68776a77c782c0abf40dc9e3fb687787e730 by Eric V. Smith (Miss 
Islington (bot)) in branch '3.8':
bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16234)
https://github.com/python/cpython/commit/7a2f68776a77c782c0abf40dc9e3fb687787e730


--

___
Python tracker 
<https://bugs.python.org/issue37904>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15833
pull_request: https://github.com/python/cpython/pull/16236

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15831
pull_request: https://github.com/python/cpython/pull/16234

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15832
pull_request: https://github.com/python/cpython/pull/16235

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-17 Thread miss-islington

miss-islington  added the comment:


New changeset b57481318e3e3cbacd398b898f9849ec8f2d7eec by Miss Islington (bot) 
(Diego Alberto Barriga Martínez) in branch 'master':
bpo-37904: Edition on python tutorial - section 4 (GH-16169)
https://github.com/python/cpython/commit/b57481318e3e3cbacd398b898f9849ec8f2d7eec


--
nosy: +miss-islington

___
Python tracker 
<https://bugs.python.org/issue37904>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-15 Thread Diego Barriga


Change by Diego Barriga :


--
keywords: +patch
pull_requests: +15779
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/16169

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-15 Thread Diego Barriga


Diego Barriga  added the comment:

I'm interest on this for my first contribution :D

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-15 Thread Diego Barriga


Change by Diego Barriga :


--
nosy: +umoqnier

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-08-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think I'd prefer "... Python uses the usual flow control statements known 
from other languages ..."

It's not just syntax, after all.

--
keywords: +newcomer friendly
nosy: +eric.smith
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-08-21 Thread Lawrence R. Normie


New submission from Lawrence R. Normie :

Suggest amending the text of the first sentence in Section 4, from:

"Besides the while statement just introduced, Python knows the usual control 
flow statements known from other languages, with some twists."

to:

Besides the while statement just introduced, Python follows the usual syntax 
fir control flow statements known from other languages, with some twists."

--
assignee: docs@python
components: Documentation
messages: 350068
nosy: docs@python, lrnor...@gmail.com
priority: normal
severity: normal
status: open
title: Suggested edit to Python Tutorial - Section 4
type: enhancement
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue37904>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2018-10-19 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Chandan Kumar and Berker Peksag. The documentation has been clarified.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2018-10-19 Thread miss-islington


miss-islington  added the comment:


New changeset b0f7fa1dda61ae7519deed816993ac5d55870958 by Miss Islington (bot) 
in branch '2.7':
bpo-21196: Clarify name mangling rules in tutorial (GH-5667)
https://github.com/python/cpython/commit/b0f7fa1dda61ae7519deed816993ac5d55870958


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2018-10-19 Thread miss-islington


miss-islington  added the comment:


New changeset efc09a9701543f7180fc7ea0b6c45cf198c29cb8 by Miss Islington (bot) 
in branch '3.6':
bpo-21196: Clarify name mangling rules in tutorial (GH-5667)
https://github.com/python/cpython/commit/efc09a9701543f7180fc7ea0b6c45cf198c29cb8


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2018-10-19 Thread miss-islington


miss-islington  added the comment:


New changeset 3e5bcd12f661bdf363c025b52a3d515829e64ed2 by Miss Islington (bot) 
in branch '3.7':
bpo-21196: Clarify name mangling rules in tutorial (GH-5667)
https://github.com/python/cpython/commit/3e5bcd12f661bdf363c025b52a3d515829e64ed2


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2018-10-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9329

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2018-10-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9328

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2018-10-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 13ae4d44381a647aadd09b70b24833052659be41 by Victor Stinner 
(Berker Peksag) in branch 'master':
bpo-21196: Clarify name mangling rules in tutorial (GH-5667)
https://github.com/python/cpython/commit/13ae4d44381a647aadd09b70b24833052659be41


--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2018-10-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9327

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2018-06-06 Thread Tim Peters


Tim Peters  added the comment:

Berker Peksag's change (PR 5667) is very simple and, I think, helpful.

--
nosy: +tim.peters

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2018-06-06 Thread Ned Deily


Ned Deily  added the comment:

What should we do with this issue?  Raymond, it sounds like you think the 
proposed PR should not be merged, is that right?  If so, should the issue and 
PR be closed?  Other opinions?  I would like to resolve this so we can either 
merge or close PR 5667.  Thanks!

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Fwd: Reporting Documentation Bug in Documentation » The Python Tutorial »6.Modules

2018-04-27 Thread VijithNambiar
Hi
I think there is a bug in the section https://docs.python.org/3/
tutorial/modules.html#more-on-modules
where the outputs of the statements below is given as wrong as it is
starting with a '0'

>>> import fibo as fib>>> fib.fib(500)0 1 1 2 3 5 8 13 21 34 55 89 144 233 377

>>> import fibo as fib>>> fib.fib(500)0 1 1 2 3 5 8 13 21 34 55 89 144 233 377
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue21196] Name mangling example in Python tutorial

2018-02-13 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I don't think we should advertise how to manually mangle the names.  That isn't 
a best practice.  The feature is automatic for a reason.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2018-02-13 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests: +5469

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2018-02-13 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Chandan or Berker,

Any interest in making a Github pull request for this patch?

--
nosy: +csabella
versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Your feedback on our free Advanced Python tutorial

2017-07-21 Thread Mario R. Osorio
It would be nice if you made it more 'readable' the light gray foreground color 
of the text makes it very uncomfortable to read, at least to me.

Take a look at: HOW THE WEB BECAME UNREADABLE 
https://www.wired.com/2016/10/how-the-web-became-unreadable/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Your feedback on our free Advanced Python tutorial

2017-07-20 Thread Noah
On 20 Jul 2017 3:03 p.m., "Aude Barral, CodinGame" 
wrote:

Hi everyone,

I am co-founder of a startup called CodinGame.

A few days ago we've launched a project: Tech.io . It's a
free knowledge-sharing platform that allows tech professionals to learn new
programming concepts through hands-on content crafted by volunteers in the
community.

Everything runs on our backend. Our system relies on Docker images so we
can play tutorials and demos of virtually any technology from the browser.

So why this project? Because as more and more resources over the Internet
now need to be paid for (Udacity, Udemy, etc), we want to foster free
online technology education thanks to peer learning. In a sense, we'd like
to become some kind of Wikipedia for tech.

One of the first tutorials our contributors published is about Advanced
Python Features (hope more will be published soon!): https://tech.io/play
grounds/500/advanced-python-features/advanced-python-features



Perfect and thanks for taking your time folks to put this together out
there for free.



I have 2 questions for you:

- Do you think this tutorial could be helpful to your Python user
community?


100% Yes


- Would you be willing to help us spread the word about Tech.io?



Yes yes yes...


Thanks a lot for checking,

Cheers!
Aude



Cheers,
Noah

-
Evolve or Extinct. Enable IPv6 now?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Your feedback on our free Advanced Python tutorial

2017-07-20 Thread Guido van Rossum
Hi Aude,

Unfortunately I don't have time to review or endorse your Python materials.

Good luck,

--Guido

On Wed, Jul 19, 2017 at 9:44 AM, Aude Barral, CodinGame 
wrote:

> Hi everyone,
>
> I am co-founder of a startup called CodinGame.
>
> A few days ago we've launched a project: Tech.io . It's
> a
> free knowledge-sharing platform that allows tech professionals to learn new
> programming concepts through hands-on content crafted by volunteers in the
> community.
>
> Everything runs on our backend. Our system relies on Docker images so we
> can play tutorials and demos of virtually any technology from the browser.
>
> So why this project? Because as more and more resources over the Internet
> now need to be paid for (Udacity, Udemy, etc), we want to foster free
> online technology education thanks to peer learning. In a sense, we'd like
> to become some kind of Wikipedia for tech.
>
> One of the first tutorials our contributors published is about Advanced
> Python Features (hope more will be published soon!): https://tech.io/play
> grounds/500/advanced-python-features/advanced-python-features
>
> I have 2 questions for you:
> - Do you think this tutorial could be helpful to your Python user
> community?
> - Would you be willing to help us spread the word about Tech.io?
>
> Thanks a lot for checking,
>
> Cheers!
> Aude
>
> 
> *Aude BARRAL*, Co-Founder
> +33 674 632 708
>
> [image: https://fr.linkedin.com/in/audebarral]
> 
> 
>   
> 
> --
> https://mail.python.org/mailman/listinfo/python-announce-list
>
> Support the Python Software Foundation:
> http://www.python.org/psf/donations/
>



-- 
--Guido van Rossum (python.org/~guido)
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue6519] Reorder 'with' statement for files in Python Tutorial

2017-06-12 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 81c05ccc10d044584dff3a69ee531094ed76ee2c by Mariatta in branch 
'3.6':
bpo-6519: Improve Python Input Output Tutorial (GH-2143) (GH-2145)
https://github.com/python/cpython/commit/81c05ccc10d044584dff3a69ee531094ed76ee2c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6519] Reorder 'with' statement for files in Python Tutorial

2017-06-12 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks everyone!
I merged the PR and backported to 3.6 and 3.5.

There are a bunch of conflicts when trying to backport to 2.7, so I decided not 
to bother.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6519] Reorder 'with' statement for files in Python Tutorial

2017-06-12 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 5a86154a931083e6a9f9bdf9cc8b3bc33abb673d by Mariatta in branch 
'3.5':
bpo-6519: Improve Python Input Output Tutorial (GH-2143) (GH-2146)
https://github.com/python/cpython/commit/5a86154a931083e6a9f9bdf9cc8b3bc33abb673d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6519] Reorder 'with' statement for files in Python Tutorial

2017-06-12 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +2195

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6519] Reorder 'with' statement for files in Python Tutorial

2017-06-12 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +2196

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6519] Reorder 'with' statement for files in Python Tutorial

2017-06-12 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset bd4e9e0ca96dabf33605d9b1fd1e0562ece8ae18 by Mariatta (Andrew 
Kuchling) in branch 'master':
bpo-6519: Improve Python Input Output Tutorial (GH-2143)
https://github.com/python/cpython/commit/bd4e9e0ca96dabf33605d9b1fd1e0562ece8ae18


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6519] Reorder 'with' statement for files in Python Tutorial

2017-06-12 Thread A.M. Kuchling

A.M. Kuchling added the comment:

PR filed against master: https://github.com/python/cpython/pull/2143

--
pull_requests: +2193

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6519] Reorder 'with' statement for files in Python Tutorial

2017-06-12 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

@akuchling Can you prepare a PR on GitHub?

--
nosy: +Mariatta

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: perl + python tutorial available for download

2017-05-07 Thread retsithortmdk
On Monday, June 30, 2008 at 9:45:18 AM UTC-7, Xah wrote:
> my perl and python tutorial
> 
> http://xahlee.org/perl-python/index.html
> 
> is now available for download for offline reading.
> Download link at the bottom.
> 
>Xah
> ∑ http://xahlee.org/
> 
> ☄

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue29390] Python Tutorial should introduce iterators and generators

2017-01-30 Thread Raymond Hettinger

Raymond Hettinger added the comment:

IMO, the iterators are introduced at the correct point.  

There are many topics that one could argue should be introduced early, but of 
course they can't all go earlier (classes should be introduced earlier because 
everything in python is an object; namespaces should be introduced earlier 
because they are core concept that affects everything from function locals, to 
closures, classes, instances, and modules).

I concur with Jim that dropping more terminology earlier in the tutorial 
doesn't serve the user well.

--
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29390] Python Tutorial should introduce iterators and generators

2017-01-30 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Typo, is *now* becoming :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29390] Python Tutorial should introduce iterators and generators

2017-01-30 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

What change do you have in mind for introducing these?

As for my personal opinion, dunno about this. I understand your concerns but 
dropping more terminology to a new learner early on wouldn't be the best idea 
in my view. 

>From what I am aware, Python is not becoming one of the *first* languages 
>people learn due to its friendly nature. Adding concepts like generators and 
>iterators when a new user is struggling with appends and mutability doesn't 
>seem like it would help. 

BTW, iterators and generators are discussed in the Classes section of the 
tutorial, don't you think this suffices?

--
nosy: +Jim Fasarakis-Hilliard

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29390] Python Tutorial should introduce iterators and generators

2017-01-30 Thread Michael Kesper

New submission from Michael Kesper:

Please look at 
http://stackoverflow.com/questions/41932287/how-can-i-create-a-loop-for-these-if-statements/41932494?noredirect=1#41932494
 

For beginners, it would be good to introduce the concepts of 'pythonic' dealing 
with sequences (iterators) and streams (generators) as soon as possible and 
everywhere where sequenceable data structures are discussed.

It is a common idiom in other languages to access members of sequences with 
counters, risking off-by-one errors or IndexErrors.

If beginners aren't introduced to the 'right' concepts soon enough, they might 
have a hard time figuring out the 'iterator' way.
Iterators should at least be mentioned in 
https://docs.python.org/3/tutorial/datastructures.html#looping-techniques.

--
assignee: docs@python
components: Documentation
messages: 286480
nosy: docs@python, mkesper
priority: normal
severity: normal
status: open
title: Python Tutorial should introduce iterators and generators
type: enhancement

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29390>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6519] Reorder 'with' statement for files in Python Tutorial

2016-11-07 Thread Berker Peksag

Changes by Berker Peksag :


--
versions: +Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6519] Reorder 'with' statement for files in Python Tutorial

2016-11-07 Thread Berker Peksag

Berker Peksag added the comment:

The patch looks good to me. I think we can tweak the content a bit. I left some 
comments on Rietveld.

Thanks!

--
nosy: +berker.peksag
stage: needs patch -> patch review
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 2.7, Python 3.2, Python 
3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6519] Reorder 'with' statement for files in Python Tutorial

2016-11-06 Thread A.M. Kuchling

A.M. Kuchling added the comment:

Good suggestion -- here's a patch that moves it and rewrites a little.

--
nosy: +akuchling
Added file: http://bugs.python.org/file45374/issue6519.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2016-06-02 Thread Berker Peksag

Berker Peksag added the comment:

I think the text is fine, but the example is not needed. I've updated Chandan's 
patch to remove the example and tweak the text a bit.

--
nosy: +berker.peksag
versions: +Python 3.6 -Python 3.4
Added file: http://bugs.python.org/file43108/issue21196.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-02 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the review. I removed the "-=" part from the patch.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ef800c30e28c by Berker Peksag in branch '3.5':
Issue #23116: Improve ask_ok() example in the Python tutorial
https://hg.python.org/cpython/rev/ef800c30e28c

New changeset 174eae50b664 by Berker Peksag in branch 'default':
Issue #23116: Merge from 3.5
https://hg.python.org/cpython/rev/174eae50b664

--
nosy: +python-dev

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23116>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-02 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I think the patch is okay except for the use of "-=" instead of the more 
verbose version.

--
nosy: +benjamin.peterson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-01 Thread Berker Peksag

Berker Peksag added the comment:

Here is a patch.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file43088/issue23116.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-01 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. added the comment:

+1 for ValueError instead of OSError.

--
nosy: +fdrake

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2016-06-01 Thread Berker Peksag

Berker Peksag added the comment:

I agree with all of Carol's suggestions. Also, OSError could be replaced with a 
more appropriate exception such as ValueError.

--
nosy: +berker.peksag
stage:  -> needs patch
versions: +Python 3.5, Python 3.6 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26842] Python Tutorial 4.7.1: Need to explain default parameter lifetime

2016-04-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Sorry but I'm going to reject this one.  I tried out the text on a Python class 
that I'm currently teaching and the learners found the text to be clear enough 
(though some were jarred by the choice of *L* as the variable name) and they 
all got the essential points (the default variable is evaluated once and what 
they should do if you don't want the default value to be shared between 
subsequent calls).

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26842] Python Tutorial 4.7.1: Need to explain default parameter lifetime

2016-04-25 Thread Edward Segall

Edward Segall added the comment:

I agree with most of your points: A tutorial should be brief and should not go 
down rabbit holes. Expanded discussion of default parameter behavior would 
probably fit better with the other facets of parameter speceification and 
parameter passing, perhaps as a FAQ. 

But I also believe a change to the current presentation is needed. Perhaps it 
would be best to introduce default arguments using simple numerical types, and 
refer to a separate explanation (perhaps as a FAQ) of the complexities 
associated with using mutable objects as defaults. 

> Also, I don't really like the provided explanation, "there are two cases 
> ...".  The actual execution model has one case (default arguments are 
> evaluated once when the function is defined) and there are many ways to use 
> it.

The distinction between the two cases lies in storage of the result, not in 
argument evaluation. In the non-default case, the result is stored in a 
caller-provided object, while in the default case, the result is stored in a 
callee-provided object. This results in different behaviors (as the example 
makes clear); hence the two cases are not the same. 

This distinction is important to new users because it's necessary to think of 
them differently, and because (to me, at least) one of them is very 
non-intuitive. In both cases, the change made to the object is a side effect of 
the function. In the non-default case, this side effect is directly visible to 
the caller, but in the default case, it is only indirectly visible. 

Details like this are probably obvious to people who are very familiar with 
both call by object reference and to Python's persistent lifetime of default 
argument objects, but I don't think that group fits the target audience for a 
tutorial.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26842] Python Tutorial 4.7.1: Need to explain default parameter lifetime

2016-04-25 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> I hope this is useful. I realize it is much longer than the original.

There lies the difficultly.  The purpose of the tutorial is to quickly 
introduce the language, not to take someone deeply down a rabbit hole.  The 
docs tend to be worded in an affirmative manner showing cases of the language 
being used properly, giving a brief warning where necessary.  Further 
explorations should be left as FAQs.  

I think we could add a FAQ link or somesuch to the existing warning but the 
main flow shouldn't be interrupted (many on the topics in the tutorial could 
warrant entire blog posts and scores of StackOverflow entries, but the tutorial 
itself aspires to be a "short and sweet" quick tour around the language.  

The utility and approachability of the tutorial would be undermined by 
overexpanding each new topic.  This is especially important in the early 
sections of the tutorial (i.e. section 4).  

Also, I don't really like the provided explanation, "there are two cases ...".  
The actual execution model has one case (default arguments are evaluated once 
when the function is defined) and there are many ways to use it.

Lastly, this is only one facet of parameter specification and parameter 
passing.  Other facets include, variable length argument lists, keyword-only 
arguments, annotations, etc.   Any expanded coverage should occur later in the 
tutorial and cover all the facets collectively.

--
nosy: +rhettinger
priority: normal -> low

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26842] Python Tutorial 4.7.1: Need to explain default parameter lifetime

2016-04-24 Thread Edward Segall
on
messages: 264135
nosy: docs@python, esegall
priority: normal
severity: normal
status: open
title: Python Tutorial 4.7.1: Need to explain default parameter lifetime
type: enhancement
versions: Python 3.5

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26842>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



RE: pdf version of python tutorial

2016-03-19 Thread Joaquin Alzola
Den 13-03-2016 kl. 14:45 skrev kamaraju kusumanchi:
> Is there a pdf version of the python tutorial
> https://docs.python.org/3/tutorial/index.html that I can download? The
> idea is to have everything in one file so I can search easily, be able
> to work offline.
>
> thanks
> raju
>

>Try here: https://docs.python.org/3.5/download.html.

>I found the tutorial in the zip-file "PDF(A4 paper size)", which contains a 
>lot of PDFs, amongst these many of howto-documents.

Download the HTML one.

--
Venlig hilsen / Best regards
Jesper K. Brogaard

(remove upper case letters in my e-mail address)
--
https://mail.python.org/mailman/listinfo/python-list
This email is confidential and may be subject to privilege. If you are not the 
intended recipient, please do not copy or disclose its content but contact the 
sender immediately upon receipt.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pdf version of python tutorial

2016-03-14 Thread Jesper K Brogaard

Den 13-03-2016 kl. 14:45 skrev kamaraju kusumanchi:

Is there a pdf version of the python tutorial
https://docs.python.org/3/tutorial/index.html that I can download? The
idea is to have everything in one file so I can search easily, be able
to work offline.

thanks
raju



Try here: https://docs.python.org/3.5/download.html.

I found the tutorial in the zip-file "PDF(A4 paper size)", which 
contains a lot of PDFs, amongst these many of howto-documents.



--
Venlig hilsen / Best regards
Jesper K. Brogaard

(remove upper case letters in my e-mail address)
--
https://mail.python.org/mailman/listinfo/python-list


Re: pdf version of python tutorial

2016-03-13 Thread kamaraju kusumanchi
On Sun, Mar 13, 2016 at 1:34 PM, Chris Warrick  wrote:
>
> There is a download link on the documentation index:
>
> https://docs.python.org/3/download.html
>

Exactly what I needed. Thanks.

raju
-- 
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pdf version of python tutorial

2016-03-13 Thread Chris Warrick
On 13 March 2016 at 14:45, kamaraju kusumanchi
<raju.mailingli...@gmail.com> wrote:
> Is there a pdf version of the python tutorial
> https://docs.python.org/3/tutorial/index.html that I can download? The
> idea is to have everything in one file so I can search easily, be able
> to work offline.
>
> thanks
> raju
> --
> Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog
> --
> https://mail.python.org/mailman/listinfo/python-list

There is a download link on the documentation index:

https://docs.python.org/3/download.html

-- 
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16
-- 
https://mail.python.org/mailman/listinfo/python-list


pdf version of python tutorial

2016-03-13 Thread kamaraju kusumanchi
Is there a pdf version of the python tutorial
https://docs.python.org/3/tutorial/index.html that I can download? The
idea is to have everything in one file so I can search easily, be able
to work offline.

thanks
raju
-- 
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: good python tutorial

2016-02-23 Thread Aaron Christensen
Thanks for sharing!

On Tue, Feb 23, 2016 at 1:48 AM, Mike S via Python-list <
python-list@python.org> wrote:

> This site was recommended by a friend, it looks really well put together,
> I thought it might be of interest to people considering online tutorials.
>
> http://www.python-course.eu/index.php
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


good python tutorial

2016-02-22 Thread Mike S via Python-list
This site was recommended by a friend, it looks really well put 
together, I thought it might be of interest to people considering online 
tutorials.


http://www.python-course.eu/index.php
--
https://mail.python.org/mailman/listinfo/python-list


[issue25808] The Python Tutorial 5.3. Tuples and Sequences

2015-12-05 Thread SilentGhost

SilentGhost added the comment:

No, what this piece of code shows is that trying to assign a value to a tuple 
element will cause an error. Of course, the same error would be raise when 
using the the value 12345, but it's more instructive to use a different value 
to not confuse the reader.

--
nosy: +SilentGhost
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25808] The Python Tutorial 5.3. Tuples and Sequences

2015-12-05 Thread Ben Schreib

New submission from Ben Schreib:

The example given in section 5.3 shows an output of "t[0] = 8" but I 
believe it should be "t[0] = 12345"

>>> t
(12345, 54321, 'hello!')
>>> # Tuples may be nested:
... u = t, (1, 2, 3, 4, 5)
>>> u
((12345, 54321, 'hello!'), (1, 2, 3, 4, 5))
>>> # Tuples are immutable:
... t[0] = 8

--
assignee: docs@python
components: Documentation
messages: 255962
nosy: Ben Schreib, docs@python
priority: normal
severity: normal
status: open
title: The Python Tutorial 5.3. Tuples and Sequences
type: enhancement
versions: Python 3.5

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25808>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2015-01-03 Thread Carol Willing

Carol Willing added the comment:

@amylou Thank you for submitting this documentation suggestion about the Python 
Tutorial.

This tutorial section, 4.7.1 Default Argument Values, tries to show that a 
function can have multiple input arguments which may be given default values.

While the suggestion to use lower() does offer more robust input handling, it 
also adds some complexity to the example by introducing another function to a 
possibly new user.

I do believe that the 'ask_ok' function could be improved by renaming the 
'complaint' argument to something more positive, perhaps 'reminder'. I would 
also recommend replacing the error message 'uncooperative user' to something 
with a softer tone, perhaps 'invalid user response'.

@amyluo If you are interested in working on documentation, section 6 of the 
Developer Guide is a handy resource 
(https://docs.python.org/devguide/docquality.html).

--
assignee:  - docs@python
components: +Documentation
nosy: +docs@python, willingc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23116
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23116] Python Tutorial 4.7.1: Improve ask_ok() to cover more input values

2014-12-26 Thread Amy

New submission from Amy:

https://docs.python.org/3/tutorial/controlflow.html#default-argument-values
def ask_ok(prompt, retries=4, complaint='Yes or no, please!'):
while True:
ok = input(prompt)

Suggestion: change to ok = input(prompt).lower() in order to cover values 
with capitalized characters such as Yes or NO.

--
messages: 233114
nosy: amyluo
priority: normal
severity: normal
status: open
title: Python Tutorial 4.7.1: Improve ask_ok() to cover more input values
type: enhancement
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23116
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Python Tutorial

2014-06-16 Thread jonadina
hello... pls how did ur tutorial creation go?
Could i get it as i am starting to learn python
thanks
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Tutorial

2014-06-16 Thread Zachary Ware
(Note, for those confused, context:
https://mail.python.org/pipermail/python-list/2010-August/584707.html)

On Mon, Jun 16, 2014 at 10:06 AM,  jonad...@gmail.com wrote:
 hello... pls how did ur tutorial creation go?
 Could i get it as i am starting to learn python
 thanks

Hi,

Please note that you've just posted to a mailing list in response to a
4-year-old post, providing no context whatsoever, which is likely to
cause many members of this list to ignore your question.  Google
Groups is only one of many ways in which people use this list, and is
the least polite-by-default -- through no fault of yours, but it means
you'll need to put extra effort into not raising ire.  See
https://wiki.python.org/moin/GoogleGroupsPython for some pointers on
how to use Google Groups politely on this list.

As for your actual question, I don't know if you will get an actual
answer; I don't recall seeing the author of the post you replied to
around here in quite some time.  However, there is a very nice
tutorial at http://docs.python.org/3/tutorial/ which should help you
get started.  Another good option is Alan Gauld's Learn to Program
website found at http://www.alan-g.me.uk/ and I'm sure a Google search
for python tutorial will turn up many options as well :).

You may also be interested in the Python 'tutor' mailing list, see
https://mail.python.org/mailman/listinfo/tutor

Regards,
-- 
Zach
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue21196] Name mangling example in Python tutorial

2014-04-14 Thread Chandan Kumar

Chandan Kumar added the comment:

Uploading the patch for the improvement to the name mangling section of the 
Python tutorial.  Please note that the modification is much smaller than I 
proposed earlier.

--
keywords: +patch
Added file: http://bugs.python.org/file34814/docs_name_mangling.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21196
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2014-04-11 Thread Éric Araujo

Éric Araujo added the comment:

Thanks for the report and proposed fix!  Could you upload a patch file that we 
could directly apply to the documentation instead of Python files?  More 
information about how to do that is found here: 
https://docs.python.org/devguide/#quick-start

If you need any kind of help, the devguide has the address of the 
core-mentorship mailing list where many friendly people can answer questions.  
You can also ask in this issue page.

--
nosy: +eric.araujo
stage:  - patch review
versions: +Python 2.7, Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21196
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21196] Name mangling example in Python tutorial

2014-04-10 Thread Chandan Kumar

New submission from Chandan Kumar:

The example used for demonstrating name mangling could be better if two 
versions of code are shown - one with name mangling and one without.  I have 
modified the original example to incorporate this (see attached).

--
assignee: docs@python
components: Documentation
files: name_mangling_works.py
messages: 215872
nosy: chandan, docs@python, rhettinger
priority: normal
severity: normal
status: open
title: Name mangling example in Python tutorial
type: enhancement
Added file: http://bugs.python.org/file34781/name_mangling_works.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21196
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   >