This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bmiller
Recipients belopolsky, benjamin.peterson, bmiller, loewis
Date 2008-04-11.20:53:19
SpamBayes Score 0.013279288
Marked as misclassified No
Message-id <1207947201.62.0.684106177687.issue2610@psf.upfronthosting.co.za>
In-reply-to
Content
> I would suggest considering a custom displayhook approach. You can
> write a custom displayhook that will print range(..), {}.keys(),
> {}.values() etc in a student-friendly way.   I believe a module
> installing such display hook can be included in the standard library.
> In addition to iterable's display problem such a hook can limit the
> amount of output when displaying long lists, insert smart line breaks
> etc.  For a textbook, you can instruct the readers to download your
> code and import a custom module before trying the examples.  This is
> likely to make your textbook more future-proof because you will be
> able to update your displayhook code as python changes.

That is an interesting idea!  I just hacked together a quick prototype.  
I'll discuss this with my co-author.  Its a fine line between using 
'real'
Python and providing an appropriate level of help for the beginner.  We
have tried to minimize the number of additional modules and 
dependencies, so
if there was a hook like this as part of the standard library that would 
be
great.

Brad
History
Date User Action Args
2008-04-11 20:53:22bmillersetspambayes_score: 0.0132793 -> 0.013279288
recipients: + bmiller, loewis, belopolsky, benjamin.peterson
2008-04-11 20:53:21bmillersetspambayes_score: 0.0132793 -> 0.0132793
messageid: <1207947201.62.0.684106177687.issue2610@psf.upfronthosting.co.za>
2008-04-11 20:53:20bmillerlinkissue2610 messages
2008-04-11 20:53:19bmillercreate