[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
**Subject**: **Re: Popularity contest**
**From**: steve donovan <steve.j.donovan@...>
**Date**: Mon, 26 Sep 2011 12:07:25 +0200

On Mon, Sep 26, 2011 at 10:52 AM, Dirk Laurie <dpl@sun.ac.za> wrote:
> but is the proposed 'import sin,cos from math' really so much more
> convenient than 'import(math,{"sin","cos"})' as to justify two new
> keywords? (As I have confessed before, I'm a Python _apostate_).
Ah, but note the difference
import sin, cos from math => local sin, cos = math.sin, math.cos
the idea is to get away from globals. Now this kind of thing can be
done with macros or whatnot, but can't be done with table magic.
steve d.