Re: The slash "/" as used in the documentation

2019-02-12 Thread Chris Angelico
On Wed, Feb 13, 2019 at 6:18 AM Peter J. Holzer wrote: > > On 2019-02-12 07:31:54 +1100, Chris Angelico wrote: > > Positional arguments with defaults is a concept known in MANY > > languages, > > True. > > > including C. > > Nope. At least not until C99, and I can't find anything in C11 either. >

Re: The slash "/" as used in the documentation

2019-02-12 Thread Peter J. Holzer
On 2019-02-12 07:31:54 +1100, Chris Angelico wrote: > Positional arguments with defaults is a concept known in MANY > languages, True. > including C. Nope. At least not until C99, and I can't find anything in C11 either. Maybe they'll add it in C2x. hp -- _ | Peter J. Holzer

Re: The slash "/" as used in the documentation

2019-02-11 Thread Chris Angelico
On Tue, Feb 12, 2019 at 8:13 AM Avi Gross wrote: > > > Just Chris, Can we keep things on the list please? > I am thinking I missed the point of this discussion thus what I say makes no > sense. Not sure. You were fairly specific with your statements about how things supposedly were in the

Re: The slash "/" as used in the documentation

2019-02-11 Thread Ian Kelly
On Mon, Feb 11, 2019 at 1:56 PM boB Stepp wrote: > > On Mon, Feb 11, 2019 at 2:34 PM Chris Angelico wrote: > > > Calling on the D'Aprano Collection of Ancient Pythons for confirmation > > here, but I strongly suspect that positional arguments with defaults > > go back all the way to 1.x. > > Has

Re: The slash "/" as used in the documentation

2019-02-11 Thread boB Stepp
On Mon, Feb 11, 2019 at 2:34 PM Chris Angelico wrote: > Calling on the D'Aprano Collection of Ancient Pythons for confirmation > here, but I strongly suspect that positional arguments with defaults > go back all the way to 1.x. Has Steve's banishment ended yet? The only postings I have

Re: The slash "/" as used in the documentation

2019-02-11 Thread Ian Kelly
On Mon, Feb 11, 2019 at 1:35 PM Chris Angelico wrote: > > On Tue, Feb 12, 2019 at 7:26 AM Avi Gross wrote: > > If you want to talk about recent or planned changes, fine. But make that > > clear. I was talking about how in the past positional arguments did not have > > defaults available at the

Re: The slash "/" as used in the documentation

2019-02-11 Thread Chris Angelico
On Tue, Feb 12, 2019 at 7:26 AM Avi Gross wrote: > If you want to talk about recent or planned changes, fine. But make that > clear. I was talking about how in the past positional arguments did not have > defaults available at the def statement level. I was talking about how use > of the symbol

RE: The slash "/" as used in the documentation

2019-02-11 Thread Avi Gross
Ian, Again, not having read whatever documentation we may be discussing, I may be very wrong. The topic is the C API. I started using C at Bell Laboratories in 1982 replacing other languages I had used before. I haven't felt a reason to use it in the last few decades as I moved on to yet other

RE: The slash "/" as used in the documentation

2019-02-11 Thread Avi Gross
Ian, I now assume we are no longer talking about the past or even the present but some planned future. In that future we are talking about how to define a function with added or changed functionality. So nothing I wrote earlier really applies because I was talking of how things did work in the

RE: The slash "/" as used in the documentation

2019-02-11 Thread Avi Gross
Ian, I want to make sure we are talking about the same things in the same ways. I will thus limit my comments in this message. If efficiency is your major consideration, then using only positional arguments of known types you can place on the stack and optimize at compile time may be a great way

Re: The slash "/" as used in the documentation

2019-02-11 Thread Terry Reedy
On 2/11/2019 2:47 AM, Ian Kelly wrote: For math.sin, sure, but what about, say, list.index? Special-case conversion is a different issue from blanket conversion. Some C functions have been converted to accept some or all args by keyword. I don't know the status of list method conversion:

Re: The slash "/" as used in the documentation

2019-02-11 Thread Chris Angelico
On Mon, Feb 11, 2019 at 6:51 PM Terry Reedy wrote: > > and not normally accessible to pure Python functions without > > some arm twisting. > > In my first response on this thread I explained and demonstrated how to > access signature strings from Python, as done by both help() and IDLE. > Please

Re: The slash "/" as used in the documentation

2019-02-11 Thread Chris Angelico
On Mon, Feb 11, 2019 at 6:49 PM Ian Kelly wrote: > > On Mon, Feb 11, 2019 at 12:19 AM Terry Reedy wrote: > > The pass-by-position limitation is not in CPython, it is the behavior of > > C functions, which is the behavior of function calls in probably every > > assembly and machine language.

Re: The slash "/" as used in the documentation

2019-02-10 Thread Terry Reedy
On 2/10/2019 11:32 PM, Ian Kelly wrote: On Sun, Feb 10, 2019 at 9:34 AM Chris Angelico wrote: Do you ACTUALLY want to call math.sin(x=1.234) or is it purely for the sake of consistency? Aside from questions about the help format, what is actually lost by the inability to pass those arguments

Re: The slash "/" as used in the documentation

2019-02-10 Thread Ian Kelly
On Mon, Feb 11, 2019 at 12:19 AM Terry Reedy wrote: > The pass-by-position limitation is not in CPython, it is the behavior of > C functions, which is the behavior of function calls in probably every > assembly and machine language. Allowing the flexibility of Python > function calls take extra

Re: The slash "/" as used in the documentation

2019-02-10 Thread Terry Reedy
On 2/10/2019 10:47 AM, Ian Kelly wrote: On Sat, Feb 9, 2019 at 1:19 PM Terry Reedy wrote: This is the result of Python being a project of mostly unpaid volunteers. See my response in this thread explaining how '/' appears in help output and IDLE calltips. '/' only appears for CPython

Re: The slash "/" as used in the documentation

2019-02-10 Thread Ian Kelly
On Sun, Feb 10, 2019 at 2:18 PM Avi Gross wrote: > I am not sure how python implements some of the functionality it does as > compared to other languages with similar features. But I note that there are > rules, presumably some for efficiency, such as requiring all keyword > arguments to be

Re: The slash "/" as used in the documentation

2019-02-10 Thread Ian Kelly
On Sun, Feb 10, 2019 at 9:34 AM Chris Angelico wrote: > > On Mon, Feb 11, 2019 at 2:49 AM Ian Kelly wrote: > > > > On Sat, Feb 9, 2019 at 1:19 PM Terry Reedy wrote: > > > > > > This is the result of Python being a project of mostly unpaid volunteers. > > > > > > See my response in this thread

RE: The slash "/" as used in the documentation

2019-02-10 Thread Avi Gross
Chris, I would appreciate another pointer to the documentation explaining what was done and why as I deleted the earlier discussion. You ask: > Aside from questions about the help format, what is actually lost by the inability > to pass those arguments by name? I am not sure how python

Re: The slash "/" as used in the documentation

2019-02-10 Thread Chris Angelico
On Mon, Feb 11, 2019 at 2:49 AM Ian Kelly wrote: > > On Sat, Feb 9, 2019 at 1:19 PM Terry Reedy wrote: > > > > This is the result of Python being a project of mostly unpaid volunteers. > > > > See my response in this thread explaining how '/' appears in help output > > and IDLE calltips. '/'

Re: The slash "/" as used in the documentation

2019-02-10 Thread Jon Ribbens
On 2019-02-10, Chris Angelico wrote: > On Mon, Feb 11, 2019 at 2:21 AM Jon Ribbens wrote: >> On 2019-02-09, Terry Reedy wrote: >> > '/' is no uglier than, and directly analogous to, and as easy to produce >> > and comprehend, as '*'. It was selected after considerable discussion >> > of how to

Re: The slash "/" as used in the documentation

2019-02-10 Thread Ian Kelly
On Sat, Feb 9, 2019 at 1:19 PM Terry Reedy wrote: > > This is the result of Python being a project of mostly unpaid volunteers. > > See my response in this thread explaining how '/' appears in help output > and IDLE calltips. '/' only appears for CPython C-coded functions that > have been

Re: The slash "/" as used in the documentation

2019-02-10 Thread Chris Angelico
On Mon, Feb 11, 2019 at 2:21 AM Jon Ribbens wrote: > > On 2019-02-09, Terry Reedy wrote: > > '/' is no uglier than, and directly analogous to, and as easy to produce > > and comprehend, as '*'. It was selected after considerable discussion > > of how to indicate that certain parameters are, at

Re: The slash "/" as used in the documentation

2019-02-10 Thread Jon Ribbens
On 2019-02-09, Terry Reedy wrote: > '/' is no uglier than, and directly analogous to, and as easy to produce > and comprehend, as '*'. It was selected after considerable discussion > of how to indicate that certain parameters are, at least in CPython, > positional only. The discussion of

Re: The slash "/" as used in the documentation

2019-02-09 Thread Terry Reedy
On 2/9/2019 2:10 PM, Piet van Oostrum wrote: Christian Gollwitzer writes: __import__( 'sys' ).version '3.6.1 |Anaconda 4.4.0 (x86_64)| (default, May 11 2017, 13:04:09) \n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]' help( __import__( 'math' ).sin ) Help on built-in function sin

Re: The slash "/" as used in the documentation

2019-02-09 Thread Piet van Oostrum
Christian Gollwitzer writes: __import__( 'sys' ).version > '3.6.1 |Anaconda 4.4.0 (x86_64)| (default, May 11 2017, 13:04:09) \n[GCC > 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]' help( __import__( 'math' ).sin ) > > > Help on built-in function sin in module math: > > sin(...) >

Re: The slash "/" as used in the documentation

2019-02-09 Thread Terry Reedy
On 2/9/2019 8:29 AM, Piet van Oostrum wrote: r...@zedat.fu-berlin.de (Stefan Ram) writes: The slash »/« as used in the documentation f( x, /, y ) is so ugly, it will disappear. Especially since it consumes a comma as it it was a parameter itself. Possible alternatives include:

Re: The slash "/" as used in the documentation

2019-02-09 Thread Christian Gollwitzer
Am 09.02.19 um 14:40 schrieb Stefan Ram: Piet van Oostrum writes: r...@zedat.fu-berlin.de (Stefan Ram) writes: The slash »/« as used in the documentation f( x, /, y ) What are you talking about? What documentation? It seems to me you are talking about a completely different programming

Re: The slash "/" as used in the documentation

2019-02-09 Thread Piet van Oostrum
r...@zedat.fu-berlin.de (Stefan Ram) writes: > The slash »/« as used in the documentation > > f( x, /, y ) > > is so ugly, it will disappear. Especially since it consumes > a comma as it it was a parameter itself. > > Possible alternatives include: > > A newline: > > f( x, > y ) > >