More or less all functions of pyBullet take an optional argument physicsClientId
which is needed when multiple instances are running in parallel.
When writing custom functions that call pybullet internally, I would like to provide this as an optional argument there as well. So I tried the following:
def my_func(..., physicsClientId=None):
pybullet.some_func(
...,
physicsClientId=physicsClientId,
)
However, when I call this without specifying the ID, I get
TypeError: an integer is required (got type NoneType)
so None
is obviously the wrong default value. As it want's an integer, I assume it is something like 0
or -1
but I would like to know if there is an official answer to this (in the pyBullet documentation, there are typically no default values specified for optional arguments).