Re: flexi adaption/casting scheme

Поиск
Список
Период
Сортировка
От Ronan Dunklau
Тема Re: flexi adaption/casting scheme
Дата
Msg-id 1896027.IKvkcEHX0B@ropc
обсуждение исходный текст
Ответ на Re: flexi adaption/casting scheme  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Ответы Re: flexi adaption/casting scheme  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Список psycopg
> 1.3
> composite type => plain Python dict with key/value pairs only
> for all attributes in the composite type that have non-NULL values

It would be great to have an API to customize the class to instantiate with a
composite type.

I tried an implementation in the attached patch.

The idea would be to add an optional "ctor" argument, which would be used in
place of the namedtuple argument. Additionally, an adapter can be
automatically registered to perform the reverse conversion.

Regards,

--
Ronan Dunklau

Вложения

В списке psycopg по дате отправления:

Предыдущее
От: Daniele Varrazzo
Дата:
Сообщение: Re: flexi adaption/casting scheme
Следующее
От: Tobias Oberstein
Дата:
Сообщение: Re: flexi adaption/casting scheme