Re[2]: Re: Comprehensions
Lenard Lindstrom <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <Mahogany-0.66.0-4294797219-20040714-112253.00@pop3.norton.antivirus> |
On Wed, 14 Jul 2004 07:05:35 -0700 Paul Prescod <[email protected]> wrote: > Mark Hahn wrote: > > >>paul:/tmp pprescod$ python ./test.pr > >>[2, 4, 6] > > > > > > How did you get this result? > > Using Python. > > >>Anyhow, generator comprehensions are more modern than list > >>comprehensions and you can easily turn a generator comprehension into > >>a list comprehension explicitly: > >> > >>list(x*2 for x in a) > >> > >>http://www.python.org/dev/doc/devel/whatsnew/node4.html > > > > > > Ok, I'll put changing list comps into gen comps into the 1.0 list. I had > > never heard of them before. Are there any other PEPs I should be aware of? > > It wouldn't hurt to take a morning and just skim them. It is hard for me > to know what you will consider important enough to want in Prothon 1.0 > or even Prothon 5.0. Here are some random interesting ones: > > S 218 Adding a Built-In Set Object Type Wilson > S 246 Object Adaptation Evans > S 269 Pgen Module for Python Riehl > S 299 Special __main__() function in modules Epler > S 310 Reliable Acquisition/Release Pairs Hudson, Moore > S 330 Python Bytecode Verification Pelletier > > > This is technically past the new feature submission deadline but I'll > > stretch the rules for you. :-) > > It is hard to know what of Python is in Prothon and what is missing. You > don't know Python well enough and I don't know Prothon well enough. > I believe the following are missing from Prothon proper: Packages: (At least I have never seen one in Prothon ) They are probably not critical for a 1.0 release but should be added soon afterwards. It would be nice if, in keeping with modules as ordinary objects, packages could just be a special module, and not tied directly to an operating system's directory structure. Slice lists and ellipses in subsripts for user defined sequences. Lenard Lindstrom <[email protected]>