Use defs instead of classes - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Use defs instead of classes (/thread-12484.html) |
Use defs instead of classes - sylas - Aug-27-2018 Hi all ! Since it is easier to use defs instead of classes, is it not reasonable to use classes only in case there are more than 1 classes ?? RE: Use defs instead of classes - Gribouillis - Aug-27-2018 Yes I watched a youtube video where a developer advocated that if a class has only one method, it should be a function instead of a class. These are somewhat precious concerns, and I don't quite agree with that. |