dflook / python-minifier

Transform Python source code into its most compact representation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Private and protected members

StefanUlbrich opened this issue · comments

Hi, awesome project.

Is it planned to shorten private and/or protected class members similarly to local variables (unsafe transformation)?

best

That's a good idea, I hadn't thought of that!

Cool, how difficult will it be to implement this feature? How can I contribute? I looked at the code base but a hint on where to start would be helpful.

It's more difficult than I initially thought, but definitely doable. The first step is tracking references to instance/class attributes. I'll have to consider it a bit more before deciding on an approach.

Ok, thanks. Please tell me if I can help

Any news on this issue? One quick way to implement this will be just pick those members starting with __ or _ and mangle them regardlessly. This is of course VERY unsafe, but should work for those who want this feature.