No in python you can specify a any size, it's just that it will be
ignored and default to the readlines(void) behaviour

On 23/02/2013 14:46, serge-sans-paille wrote:
> In pythran/pythonic++/core/file.h:
> 
>> +					// => Emulating expected behaviour
>> +					char *content = NULL;
>> +					size_t real_size = getline(&content, &real_size, **data);
>> +					if (real_size > size){
>> +						fseek(**data, -(long)(real_size - size), SEEK_CUR);
>> +						content[size] = '\0';
>> +					}
>> +					core::string res(content);
>> +					free(content);
>> +					return res;
>> +				}
>> +
>> +				core::list<core::string> readlines(int sizehint = -1) {
>> +					// Official python doc specifies that sizehint is used as a max of chars
>> +					// But it has not been implemented in the standard python interpreter...
>> +					core::string str;
> 
> On Sat, Feb 23, 2013 at 05:40:46AM -0800, Merlini Adrien wrote: In
> pythran/pythonic++/core/file.h: > + // => Emulating expected behaviour >
> + char *content = NULL; > + size_t real_size = getline(&content,
> &real_size, **data); > + if (real_size > size){ > + fseek(**data,
> -(long)(real_size - size), SEEK_CUR); > + content[size] = '\0'; > + } >
> + core::string res(content); > + free(content); > + return res; > + } >
> + > + core::list<core::string> readlines(int sizehint = -1) { > + //
> Official python doc specifies that sizehint is used as a max of chars >
> + // But it has not been implemented in the standard python
> interpreter... > + core::string str; Don't get what assert you talking
> about... the bahaviour has not been implemented in python … On
> 23/02/2013 14:34, serge-sans-paille wrote: doc specifies that sizehint
> is used as a max of chars > + // But it has not been implemented in the
> standard python interpreter.. — Reply to this email directly or view it
> on GitHub. *
> assert(sizehint == -1) ?
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/serge-sans-paille/pythran/pull/49/files#r3126690>.
>