Is it possible to check properties starting with underscore?

I worked on a very simple crud generator for pylons. I came up with something that checks

SomeClass._sa_class_manager.mapper.c

Is it possible to check this (or call methods starting with underscore)? I have always assumed that this is legal, although I frowned, as it relies heavily on the internal structure of the class / object. But hey, since python really has no interfaces in the Java sense, maybe this is normal.

+3
source share
4 answers

( Python), "private". , , , , , , , .

+8

, , , , . , , , .

+8

, ? , _sa_class_manager , SQLAlchemy . SQLAlchemy - , .

API SQLAlchemy.

0

, , , . , Python , -.

, Python , , &mdash, , , , , ( , ), , .

0

Source: https://habr.com/ru/post/1697701/


All Articles