Opened 7 years ago

#5464 defect new

doc/core/howto/pb-copyable.html gives examples misleadingly condoning definition of classes in __main__

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: core Keywords: documentation
Cc: Branch:
Author:

Description

listings/pb/copy_sender.py is intended to be used as a main script. It also defines several classes, among them a pb.Copyable subclass. Any classes used with PB need to have consistent, globally meaningful names. Not names in the __main__ module.

The example works, so far as it goes, but it gives users the impression this is something they can get away with, and if you try to do much more than the example does, then you won't get away with it.

Change History (0)

Note: See TracTickets for help on using tickets.