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.
>
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
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
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
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
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
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
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
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
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
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:
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
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.
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
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
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
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
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
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
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. '/'
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
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
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
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
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
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(...)
>
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:
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
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 )
>
>
29 matches
Mail list logo