Python Forum
Importing issues with base class for inheritance
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Importing issues with base class for inheritance
#6
Can also look at this post.
See in link how i take about simplify import(bye lifting sub-modules),so can have simpler import.

As a example when you use Requests the import is import requests (that's all).
Then with simple attribute call use it requests.get(), requests.head()...ect

My take on this that should try to make import simple for users,then do not need navigate your file tree with 3-4 import to use a package.
Usually is making a package the last step that most people have not looked much at before trying it out,then the result can be not optimal as eg under😵
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar
Reply


Messages In This Thread
RE: Importing issues with base class for inheritance - by snippsat - May-19-2021, 05:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  super() and order of running method in class inheritance akbarza 7 1,012 Feb-04-2024, 09:35 AM
Last Post: Gribouillis
  Some help with my first python class and importing ....im making a lidar program jttolleson 7 1,464 Jul-28-2023, 08:34 AM
Last Post: jttolleson
  My code displays too much output when importing class from a module lil_e 4 1,360 Oct-22-2022, 12:56 AM
Last Post: Larz60+
  Child class inheritance issue eakanathan 3 1,501 Apr-21-2022, 12:03 PM
Last Post: deanhystad
  Calling a base class variable from an inherited class CompleteNewb 3 1,898 Jan-20-2022, 04:50 AM
Last Post: CompleteNewb
  3D vector class with inheritance from 2D vector class buss0140 4 3,347 Dec-20-2020, 08:44 PM
Last Post: deanhystad
  Class inheritance oclmedyb 3 2,399 Dec-09-2020, 04:43 PM
Last Post: deanhystad
  Can we access instance variable of parent class in child class using inheritance akdube 3 14,203 Nov-13-2020, 03:43 AM
Last Post: SalsaBeanDip
  Behavior of Abstract Base Class dgrunwal 4 2,366 Oct-15-2020, 07:19 PM
Last Post: Gribouillis
  newbie question....importing a created class ridgerunnersjw 5 2,848 Oct-01-2020, 07:59 PM
Last Post: ridgerunnersjw

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020