New submission from James Thistlewood <jamesthistlew...@gmail.com>:

I stumbled across this by trying to implement a call to the latter, while 
reading the docs for the former.

I think this is quite confusing and unnecessary that the APIs between these two 
definitions should differ.  The same goes for `multiprocessing.Value` and 
`multiprocessing.managers.SyncManager.Value`.

This is especially exacerbated by the fact that the docs _are incorrect_. On 
this page [1], under 'Server process', a link to 'Array' is made. If it were 
correct, it would link to `multiprocessing.managers.SyncManager.Array`, since 
it's talking about a manager object - the kind returned by `Manager()`. But it 
links to `multiprocessing.Array`. Of course, the simple solution would be to 
change the link to link to the correct place, but I think this shows an 
unnecessary inconsistency in the API itself.

I don't have a PR for this yet, nor have I fully investigated, but should it be 
feasible I would like to implement it myself. I'm interested to hear what 
people think.

[1] 
https://docs.python.org/3/library/multiprocessing.html#sharing-state-between-processes

----------
components: Library (Lib)
messages: 374519
nosy: jthistle
priority: normal
severity: normal
status: open
title: `multiprocessing.Array` and `multiprocessing.managers.SyncManager.Array` 
APIs are similar but not the same
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41423>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to