5 ms·
Python is sufficiently inoffensive that you should just suck it up. It’s well tooled, and generally pretty well thought out.
by psergeant 9y ago
Python is sufficiently inoffensive that you should just suck it up. It’s well tooled, and generally pretty well thought out.
- qwerty456127 9y agoI agree - Python is great and rather neutral (as soon as snake_case_naming stops causing you nausea and as soon as you stop worrying about types and the fact you can't make a class member truly private) yet it has one thing I really hate - the module/package system. Coming from C# I could never "grok" it in Python (might anybody have a link to a great intro in this subject optimized for a C# mind - I'd be more than grateful) and being unable to split a single namespace into a number of files is outrageous (especially for an ADHD person who can't stand long code files and importing every this and that manually everywhere).
- mixmastamyk 9y agoImport several files into one, then import it elsewhere.
- qwerty456127 9y agoE.g. I have file aaa.py, bbb.py and ccc.py (placed in the same directory but I don't mind adding a line of code to declare their relationship explicitly). What I want is not only to be able to import them all at once in ddd.py but to access everything from aaa and bbb in ccc, everything from bbb and ccc in aaa and everything from aaa and ccc in bbb [almost] seamlessly.
- iguessthislldo 9y agoYou could create a __init__.py file that imports everything from each of those files: from .aaa import * from .bbb import * from .ccc import * Then in each of the other files (aaa.py, etc) put: from . import *
- true_religion 9y agoThats a circular import and thus not guaranteed to work.
- deleted 9y ago[deleted]
- yorwba 9y ago> being unable to split a single namespace into a number of files is outrageous The usual solution to that is an __init__.py that pulls in the names from its subpackages. I'm sure you'll be able to find an example of that in basically any large open-source Python project.
- qwerty456127 9y agoI have tried this once and it didn't work although pylint has passed with no errors (surely I admit that's because of a mistake I have made but I haven't managed to find and fix it so I've ended up just putting all the code in one file). Anyway it's not what I need as far as I understand (I have described what I need in a comment below, the answer to mixmastamyk).
- polotics 9y agoPython3 typing is fine, on a par with all other mainstream languages. Its extreme dynamism makes namespace control a non issue, just plug what you want where you want it dynamically.
- frik 9y agoIn other languages developers can choose between tabs and spaces, delimiter vs no-delimiter, different styles. Python is rather opinionated and limited, probably the most draconian Soviet-style language of all.