[Python-ideas] .from and .to instead of .encode and .decode

Luciano Ramalho luciano at ramalho.org
Tue Mar 17 17:10:32 CET 2015


On Mon, Mar 16, 2015 at 10:09 AM, anatoly techtonik <techtonik at gmail.com> wrote:
> I use the analogy of "encoding abstract numbers into specific bytes" myself.

Your version of the analogy doesn't sound as helpful to me; "abastract
numbers" sounds even more cryptic than bytes.

My mnemonics are "decode from cryptic bytes to human text" and "encode
from human text to cryptic bytes".

A more objective problem is: "from" is a keyword, so it can't be a method name.

Best,

Luciano



-- 
Luciano Ramalho
|  Author of Fluent Python (O'Reilly, 2015)
|     http://shop.oreilly.com/product/0636920032519.do
|  Professor em: http://python.pro.br
|  Twitter: @ramalhoorg


More information about the Python-ideas mailing list