On Thu, Jul 30, 2015 at 04:28:33PM +0000, David Aldrich wrote: > So main.py contains: > > def get_field(value, start_bit, end_bit): > <snip> > > and I see: > > >>> import main > >>> help(get_field) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > NameError: name 'get_field' is not defined
Naturally. Name resolution works the same for help() as for anything else. If you say: import math then you need to refer to math.sin and math.cos, not sin or cos on their own. The same applies to your main.get_field, whether you are using help() or not. -- Steve _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor