naming methods in python (std lib)

Terry Reedy tjreedy at udel.edu
Sat Jun 30 18:03:00 EDT 2018


On 6/30/2018 7:27 AM, Abdur-Rahmaan Janhangeer wrote:
> normally, naming methods in python is given by
> 
> method_name
> 
> but i see some cases where this is not followed in the std lib
> 
> ex :  dict.fromkeys
> 
> should it not have been
> 
> from_keys?

No.  _ is an option, not a requirement and usually not used for short names.


-- 
Terry Jan Reedy




More information about the Python-list mailing list