One question and one answer (this is a balanced post, :p).

The question is what to do when we found a question in a code. Reading
urllib2 I found:

  # XXX why does self.handlers need to be sorted?

I found the answer, so I deleted that line, and added a comment in that
place just to clarify. 

Shall I do something else? Like posting here the answer?

BTW, the answer to that question is that the handlers must work in an
specific order. The order is specified in each Handler (handler_order
class attribute), and BaseHandler has __lt__ defined using that
attribute. So, OpenerDirector, keeps self.handler ordered with
bisect.insort.

Regards,

-- 
.   Facundo
.
Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/



_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to