× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks John - Understand “dictionary comprehensions”? You are quite correct, I don’t even understand what the heck the words are supposed to mean. Normal people use a dictionary to comprehend the meaning of a word so without any background "dictionary comprehensions” is double-dutch.

And the idiotic names like grep and awk are on of the things that put me off Unix when I first encountered it many years ago. Gimme good ole IBM i commands any day!

I’m trying really hard to get my head around Python but I’m not impressed by the way the community appears to have handled the V2 to V3 transition. Even when reading V3 docs I have found examples in the user contribution areas that don’t work because they were written for V2! SO I run the 2to3 utility and 50% of the errors found require manual intervention. It is really slowing my learning down.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Jul 14, 2015, at 6:46 PM, John Yeung <gallium.arsenide@xxxxxxxxx> wrote:

On Tue, Jul 14, 2015 at 5:00 PM, Justin Dearing <zippy1981@xxxxxxxxx> wrote:
Python definitely has some very strangely named libaries, but hey it was
named after Monty Python.

Further, I would say Python's third-party packages are no more
strangely named than any other popular language's third-party
packages. One of PHP's leading Web frameworks is called Cake.
JavaScript has Angular.

The tradition starts way back, anyway. sed, grep, awk? emacs? Most
names have a story behind them, but are weird-sounding until you know
them and get used to them.

That being said, some of its features like list and dictionary
comprehensions let you write elegant loops that are on par with the
succinctness of .NET LINQ. i.e {var: os.environ[var] for var in os.environ}
turns all your environment variables into a dictionary/

I get what you're trying to say, but you could have picked a better
example. os.environ is already a dictionary. The expression

{key: mydict[key] for key in mydict}

is equivalent to the expression

mydict

And people who don't already recognize and understand dictionary
comprehensions are probably going to be more mystified than impressed
by the notation without any context and explanation. ("You can create
a dictionary using a dictionary comprehension" isn't much of an
explanation.)

John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.