Python

LEGB rule (scope)

Në shqip: Rregulli LEGB

ShpjegimiSQ

Kur përdor një emër, Python-i e kërkon me këtë radhë: Local (brenda funksionit), Enclosing (funksioni që e mbështjell), Global (moduli) dhe Built-in (si print dhe len).

EnglishEN

When you use a name, Python looks for it in this order: Local (inside the function), Enclosing (the surrounding function), Global (the module) and Built-in (like print and len).

Si ta mendosh

Si kur kërkon çelësat: xhepi, çanta, dhoma, pastaj gjithë shtëpia.

Lexoje në anglisht

Like looking for your keys: pocket, bag, room, then the whole house.

Terma të lidhur