On 2010-06-18, Jon Clements <jon...@googlemail.com> wrote:
>> I just wondered if something smoother was available.
>
> In terms of behaviour and 'safety', I'd go for:
>
>>>> rec = { 'code1': '1,2,3', 'code2': '' }
>>>> next(csv.reader([rec['code1']]))
> ['1', '2', '3']
>>>> next(csv.reader([rec['code2']]))
> []

Slick!

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to