Re: [Python-Dev] Adding shlex.join?

2019-04-17 Thread Simon Cross
Software that "Just Works" and hasn't needed maintenance in years is the
best software. :D
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Adding shlex.join?

2019-04-17 Thread Eric S. Raymond
Paul Ganssle :
> Hey all,
> 
> I've been reviewing old "awaiting review" PRs recently, and about a week
> ago I found PR #7605 ,
> adding shlex.join(), with a corresponding bug at bpo-22454
> . The PR's implementation is simple
> and seems reasonable and decently well-tested, but it has been
> unreviewed for ~10 months.
> 
> The reason I'm bringing it up here is that I believe the major blocker
> here is getting agreement to actually add the function. There doesn't
> seem to be much /opposition/ in the BPO issue, but given how
> infrequently the shlex module is changed I'm worried that there may be
> no one around who feels confident to judge how the interface should evolve.
> 
> Does anyone feel strongly about this issue? Is there anyone who wants to
> make a yes/no decision on this feature?
> 
> Best,
> Paul
> 
> P.S. The PR's submitter seems responsive. I made a comment on the
> documentation and it was addressed in something like 5 minutes.

I'm the person who originally wrote shlex, which I guess makes me the
authority on designer's intention.

Providing this addition is properly unit-tested (which apparently it is)
I don't have any objection to it. Seems like a reasonable idea.

So I'll say yes.  But I haven't touched this code in a long time. Maybe
somebody on the core dev team thinks they own it now; if so, they might
well be right.  If so, that person should speak up.

I suspect, however, that this code has nobody actively maintaining it
because it Just Works. In which case, the authority to make this change
should rest with the person who took the responsibility to review it.
That would be *you.*

So my advice is: pull the trigger. Get forgiveness if it turns out you need
it.  I don't expect you will.
-- 
http://www.catb.org/~esr/;>Eric S. Raymond




signature.asc
Description: PGP signature
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Adding shlex.join?

2019-04-17 Thread Paul Ganssle
Hey all,

I've been reviewing old "awaiting review" PRs recently, and about a week
ago I found PR #7605 ,
adding shlex.join(), with a corresponding bug at bpo-22454
. The PR's implementation is simple
and seems reasonable and decently well-tested, but it has been
unreviewed for ~10 months.

The reason I'm bringing it up here is that I believe the major blocker
here is getting agreement to actually add the function. There doesn't
seem to be much /opposition/ in the BPO issue, but given how
infrequently the shlex module is changed I'm worried that there may be
no one around who feels confident to judge how the interface should evolve.

Does anyone feel strongly about this issue? Is there anyone who wants to
make a yes/no decision on this feature?

Best,
Paul

P.S. The PR's submitter seems responsive. I made a comment on the
documentation and it was addressed in something like 5 minutes.



signature.asc
Description: OpenPGP digital signature
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] PEP 7: Adding anonymous union / struct

2019-04-17 Thread Inada Naoki
On Wed, Apr 17, 2019 at 8:27 PM Victor Stinner  wrote:
>
> AIX is somehow supported and uses xlc compiler: does xlc support this
> C11 feature?

I find Language Reference for v11.1 (2010/4/13)
https://www-01.ibm.com/support/docview.wss?uid=swg27017991

I find "anonymous union" in p73.

I can not find language reference for versions older than v11.1.
And I can not find "anonymous struct" in v11.1 too.

Maybe, we should consider only anonymous union?


>
> Do you want to use it in Python 3.8 and newer only?
>

Yes.

In case of bpo-27987, Python 3.6 and 3.7 uses named union
for PyGC_Head.  So changing dummy from "double" to "long double"
is enough.

In case of Python 3.8, I removed dummy from PyGC_Head and
stop using named union because it is (implicitly) aligned by two
words (16byte on 64bit, 8byte on 32bit platform) already.

But we can align it more explicitly by using anonymous union,
without adding many `.gc.` again.

Regards,

-- 
Inada Naoki  
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] PEP 7: Adding anonymous union / struct

2019-04-17 Thread Victor Stinner
AIX is somehow supported and uses xlc compiler: does xlc support this
C11 feature?

Do you want to use it in Python 3.8 and newer only?

Victor

Le mer. 17 avr. 2019 à 13:14, Inada Naoki  a écrit :
>
> Hi, all.
>
> PEP 7 includes some C99 features.
> I propose to add include anonymous union and struct to the list.
> https://www.geeksforgeeks.org/g-fact-38-anonymous-union-and-structure/
>
> Anonymous union and struct are C11 feature, not C99.
> But gcc and MSVC supported it as language extension from before C11.
>
> Anonymous union is useful when all union members have different names.
> Especially, when we need to add dummy member only for padding / alignment,
> union name looks too verbose:
>
> ... # in some struct
> union {
> struct {
>int member1;
>int member2;
> } s;
> long double _dummy;  // for largest alignment.
> } u;
> ...
> x.u.s.member1 = 42;
>
> vs
>
> ...
> union {
> struct {
>int member1;
>int member2;
> };
> long double _dummy;  // for largest alignment.
> };
> ...
> x.member1 = 42;
>
>
> Does anyone know compiler which can be use to compile Python but
> doesn't support anonymous union / struct?
>
> Regards,
> --
> Inada Naoki  
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> https://mail.python.org/mailman/options/python-dev/vstinner%40redhat.com



-- 
Night gathers, and now my watch begins. It shall not end until my death.
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] PEP 7: Adding anonymous union / struct

2019-04-17 Thread Inada Naoki
Hi, all.

PEP 7 includes some C99 features.
I propose to add include anonymous union and struct to the list.
https://www.geeksforgeeks.org/g-fact-38-anonymous-union-and-structure/

Anonymous union and struct are C11 feature, not C99.
But gcc and MSVC supported it as language extension from before C11.

Anonymous union is useful when all union members have different names.
Especially, when we need to add dummy member only for padding / alignment,
union name looks too verbose:

... # in some struct
union {
struct {
   int member1;
   int member2;
} s;
long double _dummy;  // for largest alignment.
} u;
...
x.u.s.member1 = 42;

vs

...
union {
struct {
   int member1;
   int member2;
};
long double _dummy;  // for largest alignment.
};
...
x.member1 = 42;


Does anyone know compiler which can be use to compile Python but
doesn't support anonymous union / struct?

Regards,
-- 
Inada Naoki  
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com