Closed dangu closed 2 years ago
Will this break anything if the user expects the old kind of list? We really don't want to unexpectedly break any of our users' code.
Yes. If the user does the conversion in their own code their code will break. The returned type is now a Python list instead of a swig object.
What would be the preferred way to deal with this? I see some possibilities:
Edit: Oh, wait. This was so long ago: This was not about the return of a method but the call to a user defined observer. Then my possibilities above will not work.
As things are right now, this will be too big of a change compared to the gain for the user, so it will not be added unless we were to do a big, already breaking change to pc-ble-driver-py.
It's much more convenient for on_gatts_evt_write() to return a Python list directly. Otherwise, the user is forced to do the conversion anyway to use the data in Python code.