bastibe / PySoundCard

PySoundCard is an audio library based on PortAudio, CFFI and NumPy
BSD 3-Clause "New" or "Revised" License
87 stars 9 forks source link

Rename device_info()? #40

Closed mgeier closed 8 years ago

mgeier commented 9 years ago

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

See discussion in 2b4bb3d42addfe6702dceb4630b1d1ac446bf827.

bastibe commented 9 years ago

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.

mgeier commented 9 years ago

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.

bastibe commented 9 years ago

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?

mgeier commented 9 years ago

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.