[Tutor] Fw: IDLE

2017-12-31 Thread nelson jon kane
Thanks. What do you mean when you say "find a written tutorial"?



From: Tutor  on behalf of 
Leam Hall 
Sent: Saturday, December 30, 2017 6:39 AM
To: tutor@python.org
Subject: Re: [Tutor] IDLE

On 12/30/2017 04:07 AM, Alan Gauld via Tutor wrote:

> Videos are good for getting a feel for things and
> understanding concepts but IMHO they are not good
> for details.

This is how I learn coding languages. Watch a video series for a little
bit and then find a written tutorial to work through. Getting the "big
picture" quickly helps provide a context and then digging deeply into
the actual code really helps learning.

And yeah, I'll plug Alan's tutorial. I can't think of any reason not to
use it.

Leam
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Tutor Info Page - Python
mail.python.org
Your email address: Your name (optional): You may enter a privacy password 
below. This provides only mild security, but should prevent others from messing 
with ...



___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Finding written and video tutorials for Python [Was: IDLE]

2017-12-31 Thread boB Stepp
I am renaming this thread as it has drifted off its original subject.

On Sat, Dec 30, 2017 at 9:53 AM, nelson jon kane
 wrote:
> Thanks. What do you mean when you say "find a written tutorial"?
>
>
> 
> From: Tutor  on behalf of 
> Leam Hall 
> Sent: Saturday, December 30, 2017 6:39 AM
> To: tutor@python.org
> Subject: Re: [Tutor] IDLE
>
> On 12/30/2017 04:07 AM, Alan Gauld via Tutor wrote:
>
>> Videos are good for getting a feel for things and
>> understanding concepts but IMHO they are not good
>> for details.
>
> This is how I learn coding languages. Watch a video series for a little
> bit and then find a written tutorial to work through. Getting the "big
> picture" quickly helps provide a context and then digging deeply into
> the actual code really helps learning.

What Alan and Leam are suggesting is to use a written, non-video
tutorial as your main learning tool.  If you truly wish to learn to
program you must write code, run it, inevitably get errors, correct
the errors, get more errors, correct those, etc., until you get a
finished program that does what you desire.  The struggle in doing
this is where the real learning occurs.  It is helpful starting out to
have a resource that presents the information in a logical, organized
way optimized for your learning.  Whatever resource you use will
illustrate a topic with actual code.  You should type that code in
yourself and try to run it.  If it works you should play around with
it yourself until you are certain you fully understand that code
snippet and what each piece of it does.  If it doesn't run then you
should debug it until it does run and then play around with it for
full understanding.  This interactive process of reading/watching
someone else's code and then trying it out yourself is more difficult
to accomplish with a video.  But with a book, a written webpage, etc.,
it is easy to do.

Alan has a web resource:

http://www.alan-g.me.uk/

that you could use as a written tutorial.  Use version 3 for Python 3
as that is what is current.  Other resources for people without
previous programming experience are given on Python's official website
at:

https://wiki.python.org/moin/BeginnersGuide/NonProgrammers

And of course you can search for others.

Do whatever you find works best for how you learn, but whatever you
do, make sure you write and debug code.  This is where the real
learning occurs.

-- 
boB
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Fw: IDLE

2017-12-31 Thread Alan Gauld via Tutor
On 30/12/17 15:53, nelson jon kane wrote:
> Thanks. What do you mean when you say "find a written tutorial"?

One that is written as opposed to a video.
In other words a web site or book.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Is len(a_list) a computed value or a stored attribute of a_list?

2017-12-31 Thread boB Stepp
I was wondering if len(a_list) is computed on the fly or is it a
stored attribute of the a_list object?  And is the answer the same for
both Python 2 and 3?

-- 
boB
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Is len(a_list) a computed value or a stored attribute of a_list?

2017-12-31 Thread Steven D'Aprano
On Sun, Dec 31, 2017 at 08:53:49PM -0600, boB Stepp wrote:
> I was wondering if len(a_list) is computed on the fly or is it a
> stored attribute of the a_list object?  And is the answer the same for
> both Python 2 and 3?

Technically the Python language doesn't make any guarantees about this, 
but in practice it is a stored attribute of the list (as well as other 
built-ins like tuples, strings, dicts and sets).

The answer is the same for both Python 2 and 3, and all the major Python 
implementations (CPython, IronPython, Jython, PyPy). But technically I 
guess it counts as a "quality of implementation" marker: crappy Python 
interpreters might count the items in a list on the fly, good ones will 
store it as a pre-computed attribute.

In practice, it is probably fine to assume that calling len() on 
built-ins is fast, but for third-party sequences and collections it 
might not be.



-- 
Steve
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor