Open mgzenitech opened 2 days ago
interesting idea. personally i never use __all__
and instead just rely on prefixing symbols with _
to mark them as private
i think both ways are pretty gross, i wish there was a cleaner way to do it, something like an @public
or @private
decorator. but since that's not a standardized typing feature it wouldn't be an ideal solution for some people.
interesting idea. personally i never use
__all__
and instead just rely on prefixing symbols with_
to mark them as privatei think both ways are pretty gross, i wish there was a cleaner way to do it, something like an
@public
or@private
decorator. but since that's not a standardized typing feature it wouldn't be an ideal solution for some people.
agreed, but with __all__
at least it's possible to skip _
prefixes :) I personally use _
only in classes (would prefer @public
, @private
, @protected
decorators though :D)
Not sure if it's scope of basedpyright, but maybe it would be possible to implement something like
__all__
validation so that there wouldn't be any modules without explicit exports? :)