bastibe/PySoundCard

Rename device_info()?

Closed this issue · 4 comments

When using auto-completion, this interferes with default.
It would be nice to rename it to something not starting with 'd'.

See discussion in 2b4bb3d.

This could tie into a larger plan of hiding devices and APIs. I think that the concept of numeric device IDs and numeric API IDs is quite foreign to Python.

Indeed. But these numeric IDs are a central concept of PortAudio ...

We can reduce the usage of numbers quite a bit by allowing to select devices by a device name substring, see #41.

Frankly, I don't see why the name conflict is a problem. Isn't it perfectly normal that a module has several things that start with the same name?

It's not a real problem, but it's an inconvenience for a user who uses tab-completion a lot.

In my new module sounddevice, I renamed the function to query_devices().
This way, I only need to type d<Tab> to get the default object.