Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #75523
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'from:addr:yahoo.co.uk': 0.04; 'board.': 0.05; 'gsoc': 0.05; 'true,': 0.05; 'subject:Python': 0.06; '64-bit': 0.07; 'turtle': 0.07; 'accepted,': 0.09; 'explanation': 0.09; 'happens.': 0.09; 'lawrence': 0.09; 'namespace': 0.09; 'naturally': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'worked.': 0.09; 'python': 0.11; 'bug': 0.12; 'suggest': 0.14; 'language.': 0.14; 'random': 0.14; 'windows': 0.15; '"from': 0.16; '(yes': 0.16; '.py': 0.16; 'acted': 0.16; 'agree.': 0.16; 'docs.': 0.16; 'object()': 0.16; 'ought': 0.16; 'polygon': 0.16; 'polygon,': 0.16; 'rationale': 0.16; 'received:80.91.229.3': 0.16; 'received:92.29': 0.16; 'received:plane.gmane.org': 0.16; 'worst': 0.16; 'student': 0.16; 'language': 0.16; 'wrote:': 0.18; 'examples': 0.20; 'example': 0.22; 'programming': 0.22; 'import': 0.22; 'load': 0.23; 'header:User-Agent:1': 0.23; 'directory.': 0.24; "haven't": 0.24; "i've": 0.25; 'this:': 0.26; 'tracker': 0.26; '(for': 0.26; 'gets': 0.27; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'function': 0.29; 'patch': 0.29; 'raise': 0.29; "i'm": 0.30; 'doc': 0.31; 'dramatic': 0.31; "user's": 0.31; 'file': 0.32; 'lists': 0.32; 'quite': 0.32; 'entirely': 0.33; 'implemented': 0.33; 'noticed': 0.34; 'could': 0.34; 'problem': 0.35; 'advice': 0.35; 'created': 0.35; 'something': 0.35; 'etc.)': 0.35; 'but': 0.35; 'add': 0.35; 'there': 0.35; 'really': 0.36; '(e.g.,': 0.36; 'false': 0.36; 'gallery': 0.36; 'idle': 0.36; 'installing': 0.36; 'surely': 0.36; 'done': 0.36; 'doing': 0.36; "didn't": 0.36; 'possible': 0.36; 'similar': 0.36; 'wrong': 0.37; 'too': 0.37; 'two': 0.37; 'skip:o 20': 0.38; 'problems': 0.38; 'e.g.': 0.38; 'same.': 0.38; 'star': 0.38; 'needed': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'little': 0.38; 'short': 0.38; 'does': 0.39; "couldn't": 0.39; 'sure': 0.39; 'new': 0.61; 'course': 0.61; 'simple': 0.61; 'back': 0.62; 'making': 0.63; 'our': 0.64; 'face': 0.64; 'teaching': 0.64; 'more': 0.64; 'chance': 0.65; 'finally': 0.65; 'charset:windows-1252': 0.65; 'between': 0.67; 'believe': 0.68; 'circle': 0.68; 'home': 0.69; 'wish': 0.70; 'legal': 0.71; 'computers': 0.72; 'felt': 0.74; '100%': 0.77; 'subject:For': 0.78; 'age': 0.80; 'discovered': 0.83; '#1:': 0.84; '#2:': 0.84; '(10': 0.84; 'circle,': 0.84; 'colored': 0.84; 'compose': 0.84; 'downloads;': 0.84; 'examples.': 0.84; 'forced': 0.84; 'house),': 0.84; 'remembering': 0.84; "they'd": 0.84; 'cognitive': 0.91; 'lazy': 0.91; 'procedural': 0.91; 'subject:Make': 0.91; 'enhancement': 0.95 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
| Subject | Re: 3 Suggestions to Make Python Easier For Children |
| Date | Sat, 02 Aug 2014 08:46:04 +0100 |
| References | <7ef67ccc-3fc3-47dd-b858-09ef3b57a497@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | host-92-29-186-107.as13285.net |
| User-Agent | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
| In-Reply-To | <7ef67ccc-3fc3-47dd-b858-09ef3b57a497@googlegroups.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.12537.1406965581.18130.python-list@python.org> (permalink) |
| Lines | 74 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1406965581 news.xs4all.nl 2883 [2001:888:2000:d::a6]:34659 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:75523 |
Show key headers only | View raw
On 02/08/2014 07:45, Mark Summerfield wrote:
> Last week I spent a couple of days teaching two children (10 and 13 -- too big an age gap!) how to do some turtle graphics with Python. Neither had programmed Python before -- one is a Minecraft ace and the other had done Scratch.
>
> Suggestion #1: Make IDLE start in the user's home directory.
Entirely agree. Please raise an enhancement request on the bug tracker
if there isn't already one.
>
> Suggestion #2: Make all the turtle examples begin "from turtle import *" so no leading turtle. is needed in the examples.
I'm not so sure about this, but raise an enhancement request and see
what happens. Worst case it gets rejected, best case it gets accepted,
implemented and patch applied.
>
> Suggestion #3: Make object(key=value, ...) legal and equiv of types.SimpleNamespace(key=value, ...).
Haven't the faintest idea and too lazy to find out :) I suggest follow
advice from #2.
>
> Explanation & Rationale (long):
>
> They both had Windows laptops and so we began by installing Python. They didn't know if they had 32- or 64-bit computers but it didn't matter, the installs just worked. One child had no problem but the other ended up on the Download page which lists all the possible Windows downloads; so we had to go back and start again.
>
> We discovered that IDLE's working directory is C:\Python34 -- surely this is the wrong working directory for 99% of normal users and for 100% of beginners? Naturally they saved all their .py files there until I realised. And then when I got them to create a new directory for their own files ("Python" and "pie_thon") and dragged them across they also managed to move python.exe and pythonw.exe.
>
> Couldn't IDLE start in the home directory?
>
> The turtle package is quite nice and there is a very short but dramatic colored star example at the start of the docs. There really ought to be a little gallery of similar examples, including circle, polygon, and star (yes I know circle and polygon are built in but it is nice for children to see a simple implementation), and of course a few more -- but not any that compose shapes (e.g., face and house), since one would want them to learn how to compose themselves.
>
> Making them type turtle.this and turtle.that would be torture, so we began every file with
>
> from turtle import *
>
> I wish the doc examples did the same. (For randint we did from random import randint since only the one function was needed.)
>
> I stuck to pure procedural programming since OO would have been too much cognitive load to add given the time. I did make sure that once they'd created something (e.g., a face), they then put it inside a function.
>
> However, when it came to making a game ("hit the hippo") we needed to maintain some state that several functions could access. (I had to gloss over that we were doing higher order programming! -- e.g. onscreenclick(goto) etc.) What I wanted to write was this:
>
> state = object(moving=True, score=0) # Illegal!
> ...
> state.moving = False # etc.
>
> But was forced to do this:
>
> state = {'moving': True, 'score': 0}
> ...
> state['moving'] = False # so they get confused between {} and []
>
> There is an alternative:
>
> from types import SimpleNamespace
>
> state = SimpleNamespace(moving=True, score=0)
> ...
> state.moving = False # etc.
>
> But I felt that explaining what a namespace was would be too much -- remember they're having problems remembering to put () at the end of function calls etc.
> It would be nicer if object() acted as it does now but object(key=value,...) behaved like types.SimpleNamespace.
>
Finally I believe there's a very strong chance that of of this will be
taken on board. I've noticed activity on the bugtracker recently
regarding turtle, GSOC student maybe?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
3 Suggestions to Make Python Easier For Children Mark Summerfield <list@qtrac.plus.com> - 2014-08-01 23:45 -0700
Re: 3 Suggestions to Make Python Easier For Children Marko Rauhamaa <marko@pacujo.net> - 2014-08-02 10:14 +0300
Re: 3 Suggestions to Make Python Easier For Children Mark Summerfield <list@qtrac.plus.com> - 2014-08-02 00:38 -0700
Re: 3 Suggestions to Make Python Easier For Children Marko Rauhamaa <marko@pacujo.net> - 2014-08-02 11:03 +0300
Re: 3 Suggestions to Make Python Easier For Children Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-03 02:00 +1000
Re: 3 Suggestions to Make Python Easier For Children Marko Rauhamaa <marko@pacujo.net> - 2014-08-02 20:07 +0300
Re: 3 Suggestions to Make Python Easier For Children Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-02 18:29 +0100
Re: 3 Suggestions to Make Python Easier For Children Marko Rauhamaa <marko@pacujo.net> - 2014-08-02 21:33 +0300
Re: 3 Suggestions to Make Python Easier For Children Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-03 01:43 +1000
Correct type for a simple “bag of attributes” namespace object (was: 3 Suggestions to Make Python Easier For Children) Ben Finney <ben+python@benfinney.id.au> - 2014-08-03 05:58 +1000
Re: Correct type for a simple "bag of attributes" namespace object (was: 3 Suggestions to Make Python Easier For Children) Mark Summerfield <list@qtrac.plus.com> - 2014-08-02 13:46 -0700
Re: Correct type for a simple "bag of attributes" namespace object (was: 3 Suggestions to Make Python Easier For Children) Chris Angelico <rosuav@gmail.com> - 2014-08-03 07:05 +1000
Re: Correct type for a simple "bag of attributes" namespace object Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-02 22:16 +0100
Re: Correct type for a simple "bag of attributes" namespace object Chris Angelico <rosuav@gmail.com> - 2014-08-03 07:24 +1000
Re: Correct type for a simple "bag of attributes" namespace object Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-02 22:23 +0100
Re: Correct type for a simple "bag of attributes" namespace object (was: 3 Suggestions to Make Python Easier For Children) Devin Jeanpierre <jeanpierreda@gmail.com> - 2014-08-02 16:18 -0700
Re: Correct type for a simple "bag of attributes" namespace object (was: 3 Suggestions to Make Python Easier For Children) Chris Angelico <rosuav@gmail.com> - 2014-08-03 09:27 +1000
Re: Correct type for a simple "bag of attributes" namespace object (was: 3 Suggestions to Make Python Easier For Children) Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-02 18:59 -0600
Re: Correct type for a simple "bag of attributes" namespace object Terry Reedy <tjreedy@udel.edu> - 2014-08-02 22:40 -0400
Re: Correct type for a simple "bag of attributes" namespace object Terry Reedy <tjreedy@udel.edu> - 2014-08-02 22:43 -0400
Re: Correct type for a simple "bag of attributes" namespace object Albert-Jan Roskam <fomcl@yahoo.com> - 2014-08-03 02:17 -0700
Re: Correct type for a simple "bag of attributes" namespace object Peter Otten <__peter__@web.de> - 2014-08-03 11:37 +0200
Re: Correct type for a simple "bag of attributes" namespace object Albert-Jan Roskam <fomcl@yahoo.com> - 2014-08-03 03:51 -0700
Re: Correct type for a simple "bag of attributes" namespace object Albert-Jan Roskam <fomcl@yahoo.com> - 2014-08-03 04:14 -0700
Re: Correct type for a simple "bag of attributes" namespace object Peter Otten <__peter__@web.de> - 2014-08-03 13:23 +0200
Re: Correct type for a simple "bag of attributes" namespace object Marko Rauhamaa <marko@pacujo.net> - 2014-08-03 17:51 +0300
Re: Correct type for a simple "bag of attributes" namespace object Roy Smith <roy@panix.com> - 2014-08-03 11:09 -0400
Re: Correct type for a simple "bag of attributes" namespace object Marko Rauhamaa <marko@pacujo.net> - 2014-08-03 18:52 +0300
Re: Correct type for a simple "bag of attributes" namespace object Terry Reedy <tjreedy@udel.edu> - 2014-08-03 18:55 -0400
Re: Correct type for a simple "bag of attributes" namespace object Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-04 11:19 +1000
Re: Correct type for a simple "bag of attributes" namespace object Terry Reedy <tjreedy@udel.edu> - 2014-08-04 01:26 -0400
Re: Correct type for a simple "bag of attributes" namespace object Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-04 10:13 +1000
Re: Correct type for a simple "bag of attributes" namespace object Roy Smith <roy@panix.com> - 2014-08-03 20:59 -0400
Re: Correct type for a simple "bag of attributes" namespace object Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-08-04 13:00 +1200
Re: Correct type for a simple "bag of attributes" namespace object Marko Rauhamaa <marko@pacujo.net> - 2014-08-04 08:41 +0300
Re: Correct type for a simple "bag of attributes" namespace object Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-04 00:41 -0600
Re: Correct type for a simple "bag of attributes" namespace object Marko Rauhamaa <marko@pacujo.net> - 2014-08-04 09:57 +0300
Re: Correct type for a simple "bag of attributes" namespace object Akira Li <4kir4.1i@gmail.com> - 2014-08-03 18:22 +0400
Re: Correct type for a simple “bag of attributes” namespace object Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-03 13:28 +0100
Re: Correct type for a simple “bag of attributes” namespace object Roy Smith <roy@panix.com> - 2014-08-03 08:40 -0400
Re: Correct type for a simple “bag of attributes” namespace object Chris Angelico <rosuav@gmail.com> - 2014-08-03 22:56 +1000
Re: Correct type for a simple “bag of attributes” namespace object Roy Smith <roy@panix.com> - 2014-08-03 09:25 -0400
Re: Correct type for a simple “bag of attributes” namespace object Chris Angelico <rosuav@gmail.com> - 2014-08-03 23:35 +1000
Re: Correct type for a simple “bag of attributes” namespace object Roy Smith <roy@panix.com> - 2014-08-03 10:36 -0400
Re: Correct type for a simple “bag of attributes” namespace object Chris Angelico <rosuav@gmail.com> - 2014-08-04 01:00 +1000
Re: Correct type for a simple “bag of attributes” namespace object Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-03 18:38 +0100
Re: Correct type for a simple “bag of attributes” namespace object Roy Smith <roy@panix.com> - 2014-08-03 13:44 -0400
Re: 3 Suggestions to Make Python Easier For Children Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-02 08:46 +0100
Re: 3 Suggestions to Make Python Easier For Children Mark Summerfield <list@qtrac.plus.com> - 2014-08-02 01:03 -0700
Re: 3 Suggestions to Make Python Easier For Children Terry Reedy <tjreedy@udel.edu> - 2014-08-02 19:14 -0400
Re: 3 Suggestions to Make Python Easier For Children Terry Reedy <tjreedy@udel.edu> - 2014-08-02 19:12 -0400
Re: 3 Suggestions to Make Python Easier For Children Brian Blais <bblais@gmail.com> - 2014-08-05 07:36 -0400
Re: 3 Suggestions to Make Python Easier For Children Marko Rauhamaa <marko@pacujo.net> - 2014-08-05 15:04 +0300
Re: 3 Suggestions to Make Python Easier For Children Skip Montanaro <skip@pobox.com> - 2014-08-05 07:31 -0500
Re: 3 Suggestions to Make Python Easier For Children Marko Rauhamaa <marko@pacujo.net> - 2014-08-05 16:19 +0300
Re: 3 Suggestions to Make Python Easier For Children MRAB <python@mrabarnett.plus.com> - 2014-08-05 15:11 +0100
Re: 3 Suggestions to Make Python Easier For Children Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-06 02:14 +1000
Re: 3 Suggestions to Make Python Easier For Children Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-05 22:43 +1000
Re: 3 Suggestions to Make Python Easier For Children Chris Angelico <rosuav@gmail.com> - 2014-08-05 23:08 +1000
Re: 3 Suggestions to Make Python Easier For Children Chris Angelico <rosuav@gmail.com> - 2014-08-05 23:00 +1000
csiph-web