[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-09 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
keywords: +patch
pull_requests: +23280
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24489

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-09 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Quoting from Victor Stinner's reply on python-dev 
(https://mail.python.org/archives/list/python-...@python.org/message/X6SZIVOZ233TLLJV43UQEHMV3ELGP34S/):

If there are applications relying on the parameter name, it's better
to trust the Python implementation, rather than the documentation.

It would be better to make these parameters positional only in the
first place, but now it's too late for such backward incompatible
change :-(

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-02 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-01 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
versions: +Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-01 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

There's also a discrepancy between the docs and the signature for 
create_aggregate():

https://docs.python.org/3.9/library/sqlite3.html#sqlite3.Connection.create_aggregate

create_aggregate(name, num_params, aggregate_class)

The second parameter is named n_arg, here with an underscore.

I'm not sure what's the best fix; fixing the docs or the signatures. If we fix 
the signatures, we'll at least get a kind of consistency.

--
nosy: +berker.peksag, erlendaasland

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43094] sqlite3.create_function takes parameter named narg, not num_params

2021-02-01 Thread Nicholas Chammas


New submission from Nicholas Chammas :

The doc for sqlite3.create_function shows the signature as follows:

https://docs.python.org/3.9/library/sqlite3.html#sqlite3.Connection.create_function

```
create_function(name, num_params, func, *, deterministic=False)
```

But it appears that the parameter name is `narg`, not `num_params`. Trying 
`num_params` yields:

```
TypeError: function missing required argument 'narg' (pos 2)
```

--
assignee: docs@python
components: Documentation
messages: 386100
nosy: docs@python, nchammas
priority: normal
severity: normal
status: open
title: sqlite3.create_function takes parameter named narg, not num_params
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com