how to implement a queue-like container with sort function

iMath redstone-cold at 163.com
Mon Dec 2 06:41:09 EST 2013


在 2013年11月29日星期五UTC+8下午10时57分36秒,Mark Lawrence写道:
> On 29/11/2013 12:33, iMath wrote:
> 
> >
> 
> > BTW ,the Queue object has an attribute 'queue' ,but I cannot find it described in the DOC ,what it means ?
> 
> >
> 
> 
> 
> Really? AttributeError: type object 'Queue' has no attribute 'queue'
> 
> 
> 
> -- 
> 
> Python is the second best programming language in the world.
> 
> But the best has yet to be invented.  Christian Tismer
> 
> 
> 
> Mark Lawrence

you can do a check by hasattr()



More information about the Python-list mailing list