[Python-ideas] A sorted version of **kwargs

Nick Coghlan ncoghlan at gmail.com
Fri Jan 21 03:38:59 CET 2011


2011/1/21 Hongbao Chen <microcore at yahoo.com.cn>:
> Hey, guys
>
> I must argue that make **kwargs sorted is really a terrible idea.
> Please think that when user wants a unsorted **kwargs, how can he or she
> bring the original unsorted dict back?

You can't get the original dict back now.

> When a dict is unsorted, we can sort it with implementation in Python/C
> interface or just python code for portability. That is what should be like!

You can sort an ordered dict just as easily as you can sort a normal dict.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list