I noticed that the sqlite3
-library still uses the __conform__
-method to adapt objects for storage in a database.
Then you need to give your class a method
__conform__(self, protocol)
which must return the converted value.
This seems to follow PEP 246, which specifies the __conform__
-method, but it has been rejected;
I'm rejecting this PEP. Something much better is about to happen; it's too early to say exactly what, but it's not going to resemble the proposal in this PEP too closely so it's better to start a new PEP. GvR.
^ Rejection notice of PEP 246 ^
Now, how can it be that an official Python library implements a standard that has been defined in a suggestion that has explicitly been rejected?