so I am developing a library for dealing with trees (as graph structures). I already have a class Tree that implements many things.  I now want to create two new classes, let's say Tree2D and Tree3D, that will inherit from Tree, and for which I will add 2D and 3D geometry.  As I plan to have several methods that can be applied to both 2D and 3D geometry, I would like to create a class TreeGeometry, in which I will implement those methods, and then make Tree2D and Tree3D inherit from it.  However, I do not want that someone can instance TreeGeometry objects directly. In a sense, I want this class to be "private". I've read about abstract class, so I think it might be the appropriate thing, but I'm not sure that I can make such an abstract class inherit from Tree.   Any advice on how I should proceed ?
I am coding a small Python module composed of two parts:   some functions defining a public interface, an implementation class used by the above functions, but which is not meaningful outside the module.   At first, I decided to "hide" this implementation class by defining it inside the function using it, but this hampers readability and cannot be used if multiple functions reuse the same class.  So, in addition to comments and docstrings, is there a mechanism to mark a class as "private" or "internal"? I am aware of the underscore mechanism, but as I understand it it only applies to variables, function and methods name.
Please stop using SoftwareEngineering.SE as your toilet bowl Stack Overflow users have been using the "off topic - belongs on SoftwareEngineering.SE" close reason as an alternative to all the other close reasons. It'd be helpful if people actually read the FAQ and the six  before voting to migrate questions like:   , no redeeming value to favorite lists that become argumentative , "help my exact situation" questions are too localized , fails 5 out of the 6 guidelines , fails 4 out of 6 , too localized and too vague , too broad   Absent a reversal of the Stack Overflow community from viewing SoftwareEngineering.SE as the Stack Overflow cesspool, can the "off topic - belongs on SoftwareEngineering.SE" close reason be removed in favor of manual migration by moderators who can actually spend the 10 seconds to determine if the question should be closed outright first?    To say that SoftwareEngineering.SE is such a nebulous place and nobody knows what its scope is as the reason why crappy questions keep getting migrated there is to miss the point. Good questions are good questions on all of the sites, and questions that are too vague, that are too argumentative, too localized, and too broad are universal close reasons. There is no special dispensation for SoftwareEngineering.SE to have bad questions, even if you personally think the questions on there suck.  Even the six subjective guidelines for subjective questions are universal guidelines: they affect all sites. So even if you had no idea what the consequences of using the "off topic - belongs on SoftwareEngineering.SE" close reason were, there are still all of the other close reasons for which bad questions, like the ones above, can be closed. Does sensor size affect lens distortion? There was recently a video posted about how different focal lengths affect portrait photography, specifically how distortion at smaller focal lengths have more distortion and are less flattering.   So the question is that, because we always talk about how Canon's cropped sensors have a 1.6x crop factor so the lenses are essentially longer, does the distortion caused by the lens change when used on a cropped sensor?  My initial thought is "no" given that my idea of how a cropped sensor works is like printing off a 8x10 picture and then cutting out the 4x6 that I like: the picture doesn't change, only my view of it.   However, if distortion is least prominent at the center of the photo and most prominent at the edges, then the perception of the net effect of the distortion would be changed by using a cropped sensor and I get confused again.   Any thoughts? How to disable autorefresh in snap Is it possible to disable autorefresh in snap? This  says that Snaps are updated automatically in the background to the latest version, every day. Some snaps (e.g. vlc) are built daily, and it makes no sense to install them every day. Looking for a short story about a man who is visiting a planet where you get your position/job through playing a game I read this story 8-15 years ago in German. I'm not sure but I think the book had 2 short, totally different stories in it.  The story was about a man who was sent (I think kinda forced to go) to a planet where he should play a game everyone on that planet plays. I think the goal was to beat their leader and conquer the world like this?  The better you are at the game, the higher is your position in the society. I remember that at the end he was playing against the leader and they had a long back and forth game, but I'm not sure who won.  They played the game on a different planet that had only one stripe of forest around the whole planet and a fire that goes around it. But thats only the location they were playing.  The man was chosen because he was the best player in every game if I remember correctly.  The game was a board like game where you have troops or armies that you move around. It was not an easy game everyone just could play. Application of inverse function theorem for several variable functions Let $f:\mathbb{R}^2\rightarrow \mathbb{R}^2$ be continuously differentiable, and assume $Df(x)$ is invertible for all $x\in \mathbb{R}^2$. Also for any compact $K$ in $\mathbb{R}^2$, $f^{-1}(K)$ is compact. prove $f$ is onto.  My Work:  This is an application of inverse function theorem because it satisfies the hypothesis of this thoerem. So $A=f(\mathbb{R}^2)$ is open in $\mathbb{R}^2$. So, $A^c$ is closed. Afterwards I was stuck. please give me a hint. Why are there so many close votes to review and so few of the others? In the SO Review page , I see the following stats for questions awaiting review:   Close votes:  51.8k (and rising) Suggested edits: 10 (fluctuates, but rarely goes above 20) Everything else: 0 (occasionally see some if you're really lucky)   My question is: Why?  Why are there so many close votes waiting for review? Close votes should expire after four days. And even if there's a good reason for them hanging on longer (ie they're not being viewed), there surely has to be a cut-off eventually after which they can be safely dropped?  And yes, I saw , which is asking basically the same thing. But that was several months ago, and it seems that the queue has hardly moved since then. It seems to me that there's a massive backlog that will never be cleared, and apparently will never expire either. That's not good.  And on the flip side, why are there hardly ever any new user posts or low quality posts to review -- there are always new users posting things, and I recall before this new review system was launched that the list of low quality posts to review was always pretty big. How do  methods compare in terms of model variance and bias?   My question is partly motivated by this thread: . The answer there suggests that models learned with leave-one-out cross-validation have higher variance than those learned with regular $K$-fold cross-validation, making leave-one-out CV a worse choice.  However, my intuition tells me that in leave-one-out CV one should see relatively lower variance between models than in the $K$-fold CV, since we are only shifting one data point across folds and therefore the training sets between folds overlap substantially.  Or going in the other direction, if $K$ is low in the $K$-fold CV, the training sets would be quite different across folds, and the resulting models are more likely to be different (hence higher variance).  If the above argument is right, why would models learned with leave-one-out CV have higher variance? Why do some adjectives follow the nouns they modify? Right now I can only think of one instance in which this regularly occurs.  The adjective proper is sometimes placed after the noun it modifies, e.g:      A class of cold-blooded oviparous or ovoviviparous vertebrated animals whose skin is covered with scales or scutes; the reptiles proper.   What is this word order called, and why is it ever used?  Edit: I really want to know about proper, and while the word hyperbaton relates to post-positivity when it is meant to be rhetorically impacting, it doesn't seem to fit with ubiquitous post-positivity, such as that of proper.  I've accepted hyperbaton as the correct term/reason for almost all post-positive constructions, but I'd like a complete answer to include proper. extract lines that match a list of words in another file I have file 1 which have those lines:  ATM 1434.972183 BMPR2 10762.78192 BMPR2 10762.78192 BMPR2 1469.14535 BMPR2 1469.14535 BMPR2 1738.479639 BMS1 4907.841667 BMS1 4907.841667 BMS1 880.4532628 BMS1 880.4532628 BMS1P17 1249.75 BMS1P17 1249.75 BMS1P17 1606.821429 BMS1P17 1606.821429 BMS1P17 1666.333333 BMS1P17 1666.333333 BMS1P17 2108.460317 BMS1P17 2108   And file 2 have a list of words:  ATM BMS1   So, the output will be like this:  ATM 1434.972183 BMS1 4907.841667 BMS1 4907.841667 BMS1 880.4532628 BMS1 880.4532628   I know it's really a duplicate question, but I tried all types of grep and sed and awk, maybe it will works with you guys with this tiny example  but I have a very huge file &gt; 1M lines and all previous way doesn't help  it return part of the lines that containing those words although there are other words in file 2 that matches the lines from file 1 Fancyhdr does not apply same header/footer on chapter and non-chapter pages Unintentional Lies and Misinformation Can I install any iOS version I wish by picking and choosing which firmware to restore? How do I choose a macro lens for a Canon APS-C camera? A nice user suggested  to . The edit, though very good and desirable, was rejected. I do not understand the reasons, and I did not find a way to contact those people who rejected it. What can I do to re-approve the edit? What are the scope restrictions for setting shopt extglob. and other options? My non-interactive bash shell has extglob off. I would like to turn it on in the statement immediately before a command, but I have noticed that when shopt -s extglob is within an if .. then .. else block, it somehow does not register.   The following extglob-dependant command is not valid: syntax error near unexpected token '('.     Where can extglob be set, and why is there a restriction, at all? Does this apply to other options?  ... GNU bash 4.1.5     This works:    shopt -s extglob if true ;then     touch a.bcd; ls a.@(bcd) fi   This fails:    if true ;then     shopt -s extglob     touch a.bcd; ls a.@(bcd) fi ... line 17: syntax error near unexpected token `(' ... line 17: `touch a.bcd; ls a.@(bcd)' "Holmby hall" or "The Holmby Hall", does the hall have to be capital in either of them? There have been several questions already posted with specific questions about , such as when to use it and what frameworks are there for it. However,  What is dependency injection and when/why should or shouldn't it be used? Searching for questions that have ONLY a given tag (i.e. add a range operator for tags) Show that $Kf(x,y)=\int_0^1k(x,y) f(y) \,dy\\$ is linear and continuous Let $k:[0,1]\times[0,1]\rightarrow \mathbb{R}$ continuous and $K:C[0,1]\rightarrow C[0,1]$, given by $Kf(x,y)=\int_0^1k(x,y) f(y) \,dy\\$. Prove that $K$ is continuous. I try to see continuity in $0$, but i can't find $\delta$. How do I resolve unmet dependencies after adding a PPA?