[issue8895] newline vs. newlines in io module

2015-02-24 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8895] newline vs. newlines in io module

2010-06-04 Thread R. David Murray

R. David Murray  added the comment:

This is off topic for this issue, but what you just reported makes no sense to 
me.  TextIOWrapper calls the encoder corresponding to the specified encoding in 
its write method.

That said, it is true that the IO docs are currently a class reference and not 
a user reference, and this should be fixed.  There may even already be an open 
issue for this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8895] newline vs. newlines in io module

2010-06-04 Thread Jean-Michel Fauth

Jean-Michel Fauth  added the comment:

2010/6/4 Éric Araujo 

>
> Éric Araujo  added the comment:
>
> Could you think of a way to improve the docs on that point?
>
> --
>
> Quick and dirty answer.

I have ~10 years experience with Python and it seems
to me the io module is technically excellent.

However, I have found it is not so obvious to
understand the usage of all these arguments,
errors, encoding, line_buffering, ... in the
class constructors and methods like io.open().

The doc describes what these arguments are,
their states, but not too much how to use
them.

As an exemple, I read some time ago on the c.l.p
mailing list, somebody complaining about the "encoding"
argument of the class TextIOWrapper. He defined an
"encoding='utf-8'" in the ctor and did not
understand why his "text" was not automagically
encoded. Answer: the encoding arg is only a kind
of information and does not do anything.

BTW, it was only when I read that post, I understand
a little bit more.

Regards.

--
Added file: http://bugs.python.org/file17553/unnamed

___
Python tracker 

___2010/6/4 Éric Araujo rep...@bugs.python.org>

Éric Araujo mer...@netwok.org> 
added the comment:

Could you think of a way to improve the docs on that point?

--
Quick and 
dirty answer.I have ~10 years experience with Python and it seemsto 
me the io module is technically excellent.However, I have found it is 
not so obvious to
understand the usage of all these arguments,errors, encoding, 
line_buffering, ... in the class constructors and methods like 
io.open().The doc describes what these arguments are,their states, 
but not too much how to use
them.As an exemple, I read some time ago on the c.l.pmailing list, 
somebody complaining about the "encoding"argument of the class 
TextIOWrapper. He defined an "encoding='utf-8'" in the 
ctor and did not
understand why his "text" was not automagicallyencoded. Answer: 
the encoding arg is only a kindof information and does not do 
anything.BTW, it was only when I read that post, I understanda 
little bit more.
Regards.
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8895] newline vs. newlines in io module

2010-06-04 Thread Éric Araujo

Éric Araujo  added the comment:

Could you think of a way to improve the docs on that point?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8895] newline vs. newlines in io module

2010-06-04 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file17549/unnamed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8895] newline vs. newlines in io module

2010-06-04 Thread Jean-Michel Fauth

Jean-Michel Fauth  added the comment:

2010/6/4 R. David Murray 

>
> R. David Murray  added the comment:
>
> This is as documented:
>
>   http://docs.python.org/dev/3.0/library/io.html#io.TextIOBase.newlines
>
> The keyword argument is named 'newline', the attribute is named 'newlines'.
>  The attribute does not record what was passed to the newline argument,
> rather it records what newlines have been actually encountered.
>

Ok, I see. I read, reread the doc prior posting, and, in my mind, it is not
obvious to understand this subtle difference from the doc.
Sorry for the noise.
Regards.

--
Added file: http://bugs.python.org/file17549/unnamed

___
Python tracker 

___2010/6/4 R. David Murray rep...@bugs.python.org>

R. David Murray rdmur...@bitdance.com> added the 
comment:

This is as documented:

   http://docs.python.org/dev/3.0/library/io.html#io.TextIOBase.newlines"; 
target="_blank">http://docs.python.org/dev/3.0/library/io.html#io.TextIOBase.newlines

The keyword argument is named 'newline', the attribute is named 
'newlines'.  The attribute does not record what was passed to the 
newline argument, rather it records what newlines have been actually 
encountered.
Ok, I see. I read, reread the doc prior posting, and, in 
my mind, it is not obvious to understand this subtle difference from the 
doc.Sorry for the noise.Regards.
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8895] newline vs. newlines in io module

2010-06-04 Thread R. David Murray

R. David Murray  added the comment:

This is as documented:

   http://docs.python.org/dev/3.0/library/io.html#io.TextIOBase.newlines

The keyword argument is named 'newline', the attribute is named 'newlines'.  
The attribute does not record what was passed to the newline argument, rather 
it records what newlines have been actually encountered.

--
nosy: +r.david.murray
resolution:  -> invalid
stage: needs patch -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8895] newline vs. newlines in io module

2010-06-04 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the report. Could you check the docs for 3.1 and 3.x trunk (py3k) 
too?

--
assignee:  -> d...@python
components: +Documentation -IO
nosy: +d...@python, merwok
stage:  -> needs patch
title: newline arg/attribute in the module io -> newline vs. newlines in io 
module

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com