<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 17.10.2016 20:38, David Mertz wrote:<br>
<blockquote
cite="mid:CAEbHw4aibeGnyNjYfuE9bEDJQDSW9eV=+O2cwCwLR6wgZKJMJQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">Under my proposed "more flexible
recursion levels" idea, it could even be:
<div><br>
</div>
<div> [f(x) for x in flatten(it, levels=3)]</div>
<div><br>
</div>
<div>There would simply be NO WAY to get that out of the *
comprehension syntax at all. But a decent flatten()
function gets all the flexibility.</div>
</div>
</div>
</div>
</blockquote>
<br>
I see what you are trying to do here and I appreciate it. Just one
thought from my practical experience: I haven't had a single usage
for levels > 1. levels==1 is basically * which I have at least
one example for. Maybe, that relates to the fact that we asked our
devs to use names (as in attributes or dicts) instead of deeply
nested list/tuple structures.<br>
<br>
Do you think it would make sense to start a new thread just for the
sake of readability?<br>
<br>
<blockquote
cite="mid:CAEbHw4aibeGnyNjYfuE9bEDJQDSW9eV=+O2cwCwLR6wgZKJMJQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Honestly,
it goes beyond just being "wrong". The repeated refusal to<br>
even acknowledge any equivalence between [...x... for x in
[a, b, c]]<br>
and [...a..., ...b..., ...c...] truly makes it difficult
for me to<br>
accept some people's _sincerity_.<br>
</blockquote>
<div><br>
</div>
<div>I am absolutely sincere in disliking and finding
hard-to-teach this novel use of * in comprehensions.</div>
</div>
</div>
</div>
</blockquote>
<br>
You are consistent at least. You don't teach * in list displays, no
matter if regular lists or comprehensions. +1<br>
<br>
<blockquote
cite="mid:CAEbHw4aibeGnyNjYfuE9bEDJQDSW9eV=+O2cwCwLR6wgZKJMJQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div> P.S. It's very artificial to assume user are unable to
use 'from itertools import chain' to try to make chain()
seem more cumbersome than it is.</div>
</div>
</div>
</div>
</blockquote>
<br>
I am sorry but it is cumbersome.<br>
<br>
<br>
Regards,<br>
Sven<br>
</body>
</html>