Re: [Tutor] How to use a function

2015-01-19 Thread Albert-Jan Roskam
On Mon, Jan 19, 2015 3:32 PM CET jarod...@libero.it wrote: >Dear All, >I would like to understand how work this funcion: > >def parse_illumina_readset_file(illumina_readset_file): >readsets = [] >samples = [] > >log.info("Parse readset " + illumina_readset

Re: [Tutor] list comprehension with else

2015-01-19 Thread Sydney Shall
On 19/01/2015 00:55, Steven D'Aprano wrote: On Sun, Jan 18, 2015 at 02:20:55PM -0800, Danny Yoo wrote: Just to add, log(0) is mathematically undefined. https://en.m.wikipedia.org/wiki/Logarithm. For the record, IEEE-754 specifies that log(0.0) should return -INF. That's what Decimal does: py>

Re: [Tutor] How to use a function

2015-01-19 Thread Peter Otten
jarod...@libero.it wrote: > Dear All, > I would like to understand how work this funcion: > > def parse_illumina_readset_file(illumina_readset_file): [snip code by someone who has yet to learn how to use dicts;)] > return readsets > > > parser_illumina_readset_file("~/Desktop/file.csv")

Re: [Tutor] How to use a function

2015-01-19 Thread Dominik George
Hi, > parser_illumina_readset_file("~/Desktop/file.csv") > > dir() > > I can't found the readsets list. Someone could please help me? > thanks so much! Maybe: readsets = parser_illumina_readset_file("~/Desktop/file.csv") In your call, you discard the result, which, obviously, discards it. -

[Tutor] How to use a function

2015-01-19 Thread jarod...@libero.it
Dear All, I would like to understand how work this funcion: def parse_illumina_readset_file(illumina_readset_file): readsets = [] samples = [] log.info("Parse readset " + illumina_readset_file + " ...") readset_csv = csv.DictReader(open(illumina_readset_file, 'rb'), delimiter='\t