lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 9/7/05, Antero Vipunen <antero@nsk.ru> wrote:

> Could you please clean it up? There is irrelevant stuff for
> hex-num-handling.

> from some.pkg import name_0, ..., name_n

Here is the bare minimum that uses the keyword 'in' instead of 'from'.
The changes are confined to lparser.c
http://lua-users.org/files/wiki_insecure/power_patches/5.1-alpha/basic-from.patch

I really like Python, but I find its import syntax odd.  I would
prefer it to read

    import x,y,z from some_package

But then that is ambiguous with the simpler

    import some_package

So they ended up with something rather odd.


Also, this patch isn't just for importing variable from modules.  It's
a general enhancement to the assignment statement for unpacking named
values from tables.

- Peter Shook