New submission from Cal Leeming:

The documentation states that pkgutil.walk_packages() path must be None or a 
list of paths [1]. After passing in a string, the result was a blank list 
rather than a type error or automatic conversion to a list.

If this method is documented that it must only accept a list or None, then 
there should surely be type checks to this effect? This was a bit of a gotcha 
that left me head scratching for 30 minutes (after not realising it only took a 
list, not an str, which in itself seems a bit odd)

----------
components: Interpreter Core
messages: 247529
nosy: sleepycal
priority: normal
severity: normal
status: open
title: Lack of type checks in pkgutil.walk_packages and friends
versions: Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24744>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to