magic method __bytes__
On Mon, 13 Jan 2014 17:38:38 -0800, Ethan Furman <ethan@stoneleaf.us> wrote:
Has anyone actually used __bytes__ yet? What for?
bytes(email.message.Message()) returns the message object serialized to "wire format". --David PS: I've always thought of "wire format" as *including* files...a file is a just a "wire" with an indefinite destination and transmission time....
On Tue, Jan 14, 2014 at 10:58:49AM -0500, R. David Murray wrote:
On Mon, 13 Jan 2014 17:38:38 -0800, Ethan Furman <ethan@stoneleaf.us> wrote:
Has anyone actually used __bytes__ yet? What for?
bytes(email.message.Message()) returns the message object serialized to "wire format".
--David
PS: I've always thought of "wire format" as *including* files...a file is a just a "wire" with an indefinite destination and transmission time....
Nice analogy! I must steal it :-) -- Steven
participants (5)
-
Benjamin Peterson
-
Ethan Furman
-
R. David Murray
-
Stephen J. Turnbull
-
Steven D'Aprano