How can i make a method available only from within the class

Alexandro

Good evening, i need an advice, googling i couldn't find a proper direction. I need to make a method available only within the class (i.e other methods or functions), if called from the program as a method of the object referring to the class i want:

  • the method to be invisible/not available to the intellisense
  • if i'm stubborn, and code it anyway, must raise an error.

Attaching a screenshot to make it more clear. Any advice is appreciated, Thank you.

Screenshot of the problem

Puff

There's no private methods in python. Common usage dictates to precede a method that's only supposed to be used internally with one or two underscores, depending on the case. See here: What is the meaning of single and double underscore before an object name?

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Can I extend an @Component and create another @Component class and make only one available at a time?

Why can´t I create a class object within a method from a different class in Java?

How can I make an interface instance method accept arguments of the same class only?

How do I make a constructor available to only the factory class?

How can I make a WireBox injected dependency available to a constructor method?

How can I make a method to take only serializable objects?

How do I make a variable in my class global but only make it global within the class?

How can I make API gateway only available to my ec2 instance?

How can I make only the parent method run in a class inheritance on PHP?

How can I make an interface instance method accept arguments of the same class only, really?

How do I call a base class method from within the same overloaded derived class method in python?

How can I create a Global FileInputStream object, which will be available to access from other class within in my project?

How Can I Call a Class Method From a Different Class in Python?

How can I access a class data member from a method within the same class?

How to make a java class only available to one other class in a package

How can I start a ViewController from within a Method?

Can I reference a class from a method within an inner class, and if so, how?

In Python, can you change how a method from class 1 acts on class 2 from within class 2?

How can I access only one specific method from the UWP class?

How can I use a Method from a class in a different class?

How can I make a method accept a class type variable in Java?

How can I make a class method that takes a function as a parameter?

how can I make this calculator using only one method?

How can I access a variable that is defined within the method in the class?

How can i define a method in a class that it return only part of the class

How can I make a list defined in one method available in another method when both methods are in the same class?

How can I access a method of a class from a generic method

How can i make only one choice available from 3?

How can I remove the event listeners from within a javascript class?