Computer Science, asked by jaswantB13, 9 months ago

What is name resolution rule? Why we need this rule in Python.How Python resolve it .Explain the rule with good example. ​

Answers

Answered by Anonymous
1

Answer:

Names are resolved following these resolution rules: Fully qualified names always resolve to the name without leading namespace separator. For instance \A\B resolves to A\B. Relative names always resolve to the name with namespace replaced by the current namespace.

Scope resolution via LEGB rule :

In Python, the LEGB rule is used to decide the order in which the namespaces are to be searched for scope resolution. The scopes are listed below in terms of hierarchy(highest to lowest/narrowest to broadest): Local(L): Defined inside function /class.

The resolution rule in propositional logic is a single valid inference rule that produces a new clause implied by two clauses containing complementary literals. A literal is a propositional variable or the negation of a propositional variable.

HOPE IT HELPS ....

Similar questions