Hacker Newsnew | past | comments | ask | show | jobs | submit | more task_queue's commentslogin

An equivalent in Python is

>>> Entry = namedtuple("Entry", "id description amount")

>>> Entry(*line.split(','))

Entry(id='1', description='an entry', amount='99')


Neat, but can I add few methods to my Entry touple?

Can it inherit from something else?

Can something else inherit from Entry?

Won't named touple have some of its own methods that my methods could have collided with?


>Neat, but can I add few methods to my Entry touple?

Yes, if you subclass it.

> Can something else inherit from Entry?

Yes, it can be subclassed.

>Won't named touple have some of its own methods that my methods could have collided with

Yes and no, it has the "index" and "count" methods any tuple should have, which can easily be overridden by specifying them as attributes in the second argument to the contructor, through reassignment during initialization or method overriding.


You can use a `namedtuple` class as a base class, e.g. like this:

    class Entry(namedtuple('Entry', ('id', 'description', 'amount')), SomethingElse):
        def more_methods(self):
            pass


Thank you for this example. It's exactly the thing I had with CoffeeScript


http://pyjs.org/Translator.html

>Overall, the general rule is that whoever wants or needs something, they either work around the limitations of JavaScript and the pyjs implementation, or they contribute code to improve the compiler/translator.

The lament of the transpiler


Is this really a thing?


For some Dads, alas, yes. It is a thing. Open affection towards ones children, in some settings, can be a surefire way to attract unwanted attention from people who can only be described as hair-trigger SJW's, just waiting to pounce on any male they deem a threat, and 'offensive' behaviour such as holding ones daughters' hand, or giving her a kiss in greeting, has often gotten a Dad in more hassle than its worth. I think its atrocious - as a father, I can't think of anything worse than some social entity claiming that my affection for my children has a nefarious intent. It is really a common tragedy, alas - so much so that I see associate Fathers whose daughters just don't get balanced affinity from their parents. Yes, it is a thing, and it is a sad state of affairs.

My boys get hugs and kisses regardless. Love shouldn't have to be defended from others, but alas PDA for children is a huge social issue in modern America - and England too, I have noticed. In some ways, our societies are terribly pornographic.


A couple of years ago I was in a waiting room at a medical clinic. There was a family of three there, a man, a woman, and (I presume) their daughter. The daughter was approaching teenage; she must have been 12 or 13 -- so, not a young child. I was struck by how casually affectionate she was with her father, even at that age sitting on his lap and being held. It was enough to make me wonder if something untoward was going on between them, but I'd be the first to agree that my having that thought says more about me than about them. Really there wasn't anything in their manner that suggested anything except that they loved each other.

I don't know if I could be as un-self-conscious with a daughter, at that age, in public. And that troubles me.

Good for you for not letting the SJWs get to you.


Downvotes??? ... Oh, I see, it's because I followed the parent in using the abbreviation "SJW". It's not one I normally use; I will avoid it in future.

However. I have read in the news about parents being arrested for allowing their children -- 9- and 10-year-olds, not young children -- to play unsupervised, or (in one case) to hang out at a mall while their parent was at a job interview there, for what some busybody thought was too long. 50 years ago, one could never have imagined the police being called -- or if they had been called, actually arresting the parent -- in such a situation. Whatever label one puts on it, there has been a change in American culture that I think is not entirely salutary. Protecting children is important, but people are jumping to conclusions that are not actually warranted by the facts and nuances of the situation.


In Canada we were warned not to leave our kid (9 years old) unsupervised at the house because it would be considered abandonment. I'm so lucky I didn't grow up in a place like that. By the time we were 6 and 4 my sister and I would take care of ourselves until mom came home from work. This included getting dressed, going to school, going back in the aftenoon. I don't remember a time when I didn't have a key to the house to let myself in when there was nobody home.


You don't recognise the survivor bias? You don't think that leaving a six year old in charge of a four year old is irresponsible and dangerous?

Ideally the "rule" is a guideline, and is only ever used as part of a package of information to protect children (who are by definition vulnerable).

So "left young children alone" gets at most a friendly chat with some advice about home safety, while "left children at home alone" combined with "arrested for drunk and disorderly" and "arrested for solicitation and drug possession" gets a friendly chats combined with targetted drug and alcohol rehab.

It's weird that CPS bother taken action in these cases. They're so busy with other cases where the need is unambiguously there.


> You don't recognise the survivor bias? You don't think that leaving a six year old in charge of a four year old is irresponsible and dangerous?

Yes, it's absolutely terrible. But when you're a single mom and you have to go out and make a living it helps if you raise your kids in a way that teaches them to take responsibility from an early age.

My sister and I never thought this was 'dangerous', we walked hand-in-hand to school, crossed at the lights like were were taught to and never were late or went missing.

For sure the world was safer back then, today it may not be possible to live like this but I'm pretty happy that we had the experience of being trusted with some responsibility from an early age onward.

The survivor bias is non-existent, there were tons of kids like us back then and I don't recall any of them that didn't make it because of being unable to walk home from school or being home for an hour or two un-attended.


> For sure the world was safer back then, today it may not be possible to live like this but I'm pretty happy that we had the experience of being trusted with some responsibility from an early age onward.

The world was more dangerous back then.

There was more crime. Products were less safe (eg cars were more likely to kill pedestrians in accidents) etc.

> The survivor bias is non-existent,

The person most likely to harm your child is your other child. While the numbers are tricky we think sibling sexual abuse is about 5 times more common than paternal sexual abuse in the US. (This is from reported figures. There's a lot of attention on paternal abuse, there's not much attention of sibling sexual abuse, so we think that sibling abuse is less reported than paternal abuse even though they're both under-reported).

In the UK one in twenty children have been sexually abused. http://www.nspcc.org.uk/preventing-abuse/child-abuse-and-neg... it's unfeasable that none of the tons of kids like you were unaffected by this, or were not neglected to the level of abuse.


Indeed, that's unfeasible. But if you start reasoning like that the best way to prevent children from sexual abuse is to simply not have children at all. After all some of them will surely be victims at some point.

I'm not a big fan of the nanny state, I think life is full of risks and if you arrange society in such a way that all the risks are gone you will squeeze the life out of it as well. It's a hard balance to get right but I feel that going overboard on the protective side is not the answer.


"Don't leave six year olds in charge of four year olds" is going overboard?


That development is absolutely a cause for concern, but as far as I can tell, SJW's tend to be the people fighting such injustices, not perpetrating them. It is mainstream culture that has developed some sickening tendencies, and those need to be addressed and fought. Though I admit SJW has become a vague term that's also sometimes thrown about as a pejorative, for some reason.


I still hug my son, he's 21. Wonder what people make of that, though he doesn't sit in my lap. (Though I could probably sit in his, he's easily a head taller than I am.)


I feel like the answer is "nothing". My wife and I were talking about the parent's example of a 12 year old girl sitting in her dad's lap. I come from a warm, but relatively reserved, family and found it a bit weird. My wife comes from a very openly affectionate family and didn't.

But from the reserved side of the exchange, I definitely tend hug my dad when I greet him or leave.


Clearly, you are doing things right.


I don't doubt this happens, but is it really a "huge social concern" and does it "often gotten a Dad in more hassle than its worth"? Your anecdotal evidence says yes, mine says no.

Extreme logic alert...you say "as a father, I can't think of anything worse than some social entity claiming that my affection for my children has a nefarious intent." You can think of _nothing_ worse? Really? Where do you live I want to move there.

* emphasis mine


Can you give any examples of this coming from "SJWs"? Little confused by that specific part of your comment.


As the father of a 5 year old girl and a 2 year old boy, I can only add "huh? I'm confused."


Anyone using SJW (or cuckservative) in a non-ironic way is doing serious damage to their credibility. IMO


That used to be the case but now it is not entirely so. If reputable people (e.g., high-karma HN users) continue to use either word it will eventually be "redeemed" wherever they are reputable and become acceptable to use.

edit: For the record, I didn't downvote you.


It's actually a great shibboleth.


No need to call every social misbehavior "SJW".


Frankly, it makes me think the parent poster is not looking at this realistically.

What do feminists have to do with this? A typical feminist position is that our society expects dads to be cold and distant and leave parenting to the women, and that this is a bad and sexist assumption. Feminists explicitly call for men to be more involved in parenting and childcare.

It would make just as much sense if he'd blamed this problem on communists.


He's insinuating that a father that is too close to his daughter would be perceived as a pedophile by women who believe that all men are potential victimizers of women.

That perception does exist, I personally experienced it at a park less than a week ago. It is an open question who is "responsible" for it.


Yes, that attitude (that men being close to daughters is a threat) exists. But does that meme/idea come from feminists? Or from some other part of society that hates paedophiles?


I am not a fan of the term "toxic masculinity" because in the way it is invoked it usually means "all masculinity" (I don't subscribe to that model.) But, I believe that the idea that all men are irredeemable sexual beasts does come from a distorted masculinity that makes naturalistic excuses for sex crimes ("males can't control themselves".) I believe this is a factor in the fear of any man being around any child. Another factor is that pedophile are OK to hate, and where hate is left unchecked it grows and becomes increasingly irrational.


Its more appropriate to consider whether it is sourced from misanthropic ideals than anything else, since the assumption that a loving father is a paedophile is, simply, a form of hatred.


You did what, and someone did what, and you knew they were a feminist because?


People are downvoting, but I'm just asking: what was the actual behavior? Did people run after you saying pedophile? Did they follow you around the park watching? Did you feel uncomfortable?

I'm confused how someone would not want to ask those questions.


> typical

I think the issue is that it's hard to nail down what is "typical". I think you are certainly right, but there is "typical" (i.e. majority of feminists/people think this way) and there is "socially visible" (e.g. SRS/Tumblr, etc). When a person uses the SJW acronym they are definitely talking about the latter, but it's unfortunate if they conflate that with mainstream feminism: that men should be more affectionate and involved in parenting and not emotionally repressed in Western society, as opposed to the tripe that you find on the dumber parts of the web.


I don't think that's true at all. SJW has no more content than "hairy man-hater". It's just an insult that can be thrown around at any feminist without any justification.

It's not like "TERF" or "anti-sex-worker" or other disparaging terms that nonetheless have specific meaning. There's simply no pattern to who gets called a SJW, other than that they pissed off gamergaters or MRAs.


SJW is not usually thrown around at "any feminist" without justification. I think the most broadly you'll ever see it applied is toward all third-wave feminists, but even that is pretty rare. Whenever I see it used, it is directed almost exclusively at SRS/Tumblr types.

The term may be more broadly applied in GamerGate/MRA circles or whatever, but who gives a shit? Those people are assholes, and they don't represent even a significant minority of anything, to say nothing of majority. Why should anyone care what they think, or what loaded and mangled terminology they use to describe their perceived enemies? None of those idiots would last long on HN, or any of the more reasonable communities on Reddit, much less anywhere in real life, unless they kept their outrageous and wrong opinions to themselves. Which is as it should be.


My impression is that some people fighting for real social justice are in the process of owning this. I get that GamerGaters and MRAs mean it as an insult, but it sounds like using "good person" as an insult. It literally means "someone who fights for social justice". In what way is that possibly a negative thing? Using it as an insult sounds like you're unapologetically against justice, and basically admit to being a bad person.

(I'm aware that there are people who claim to be fighting for social justice but are in reality weaponizing other people's struggles as ammo in their own private feuds. This is unfortunately a thing, but the right way to handle that is to recognize that they are not really SJWs, not to accept SJW as a bad thing.)


I agree with the part about how some people may not be bothered by the label.

Still, I think the point of it is like calling someone a "morality crusader". Morality is good (if you don't mean "hating gays" by morality, mind you), but if someone called me a morality crusader, I'd get that they thought I was pompous, self-important and meddling in other people's business.


I don't know why you consider that "justice". That sounds awful to me.


Its not justice, and thats the point. Innocent until proven guilty doesn't really seem to apply much to those Dads' who openly love their kids and wish to express that love physically - i.e. hugs, kisses, hand-holding, care. Its a tragic circumstance that a man can't express his love for his kids without having to suffer from social stigma at the hands of those who think they are doing society a favor by propagating the dogma that any man who loves a child must be an offender. I've certainly run into it in my life often enough that I think its really insane that Dads can't love their kids without this threat. I guess it is in some ways similar to the prejudices that the other sexes experience, and maybe fundamentally its sourced from the same conscious/subconscious desire to control the way other people live their lives, regardless of differences/similarities between the relevant parties. If someone wants to hug their kids and openly show affection in the face of social stigma, I think its really the only way out for all of us. Love, above all.


I agree. I don't understand why you think fighting against affection and care is "social justice". Sounds like the opposite to me.


SWJ does not refer to most feminists, or social justice advocated. The term originated from, and is most associated with a vocal sub-culture of anti-male feminists largely on tumblr, though somewhat in the larger blog-o-sphere.

It's classical puritan pearl clutching with the sacred cows of the left instead of the right, totally annoying, and totally completely normal and well within the tradition of American moral panics.


But still, using SJW as something negative sounds odd. And as a matter of fact, I know a lot of feminists, including male ones, who care deeply about social justice and tend to identify with the term SJW. The argument shouldn't be whether social justice is good or bad, but about what social justice really entails. Clearly, man-hate has no place in it; no kind of hatred of a general class of people is just.


[flagged]


I find it amusing that defining the term is met by an instant ad hominem attack making a claim that all users of the term are unintelligent woman haters.

No I'm not aware of any example right off the top of my head. I'm sure I could cherry-pick something if I looked hard enough. That's not the point I was aiming to communicate though.

You are quite right that they are involved in an ongoing ideological battle with "the neckbeards" online. Regardless of who tends to use it. The term SJW is pointing to a community that exists on tumblr, that claims to be serving social justice, and holds to a wildly exaggerated definition of basically every term in social science relating to power, oppression, and identity politics. This same community tends to be rather wildly reactive to basically everything that upsets them.

They're a vocal minority, as real as and about as rare as the tea party or rabid Trump supporters.


Interestingly, I know people who simultaneously identify as SJW (because they fight for social justice) and as neckbeard (because they have a beard that covers their neck).

Maybe the people I hang out with are unusually literal in their interpretation of words, and ignore people who try to attach negative meaning to perfectly fine words.


So a few people point to "SJWs" as causing problems for men showing affection to their daughters, but noone can provide any examples.

This is, to you, evidence that "SJWs" are winning.

To me it's another example of the lies and misinformation spread by misogyinists.


When did I make a claim that they were winning?

I feel like you are arguing with someone else in your replies to me. When did I ever make a claim that "the SJWs" were winning? Someone asked what the term meant, I took the time to dereference the pointer for them, and provided a bit of the origin of the term.

I also added a bit of snark about how the whole phenomena is a completely normal re-occurring part of American social discourse. The SJWs, prohibitionists, and witch hunts are all a part of the same line of moral panics that eschew logic and argument in favor of emotions and appeals to moral authority. They happen every 3-4 generations in the US, and probably come from the Utopian ideals of the Pilgrims that has evolved into the american progressive movement.


It's an insult, and you didn't bother to hide it in your parent post.

If you're surprised that the people being insulted don't take kindly to it, life is going to be very frustrating for you.


Amusement and surprise are in fact different emotions.

In general the utility of SJW as a label is strongly attached to the fact that the community in which the label originated is not one people wish to be associated with.


It may have started out that way, but now is used to describe social progressives who tend towards shaming tactics and thought policing.

Which unfortunately is the most vocal type of social progressive.


Heh... it orginated as a self-label on tumblr. When their toxic behavior became well known it became an insult.


From what I've seen, it's generally meant to be read ironically. Think "social justice rage" vs "social justice advocate".


There is a difference between stating a scientific finding and making a prejudice remark. Especially when the former isn't thinly veiled support for the latter.

I guess I'm being oversensitive because I'm reading the OP as implying that the term "sexist" is thrown around inappropriately.


Was it overly optimistic of me to assume it was a joke?


Poe's Law?


So it's not sexist if men and women are different, as long as it's "immune system functions" and not "statistical behaviors at work"?

How did you arrive at the distinction?


Anything that doesn't result in equal outcome of greateness is sexism. For example, asking 50% reservation for women in soldiers going to war is sexism because war is not greatness, but preferring women 200% over men in STEM[1] is not sexism because doing science is greatness and women are still < 50% of sceintists.

Just joking of course. Women having different immune system functions means more funding for women specific medicine - hence it is good. Study of behavior at workplace based on gender doesn't generate funding because there aren't many women doing startups anyway.

You keep watching, in a decade or two when there will be enough women in startups that they will actually have any economical significance there WILL be studies conducted. And depending on how that turns out - if 'women better than men', it will be an 'evil corrected' story, and if 'women worse than men', state will intervene via laws to protect women's rights. It has already started actually.

This is why I took the risk of losing mod points and posted 'another decade' comment above.

1. https://www.youtube.com/watch?v=B9ICcdpH2WA


It isn't so weird if he delusionally accepted his hypothesis from the get go.


Homejoy provides a service. The OP cancelled that service. What service was rendered that required an additional payment to be fair to Homejoy?


Homejoy was certainly not fair to try and charge $10 MORE to cancel the order. But 'forfeiting' your credit card charge just because you could not or did not cancel in time, that doesn't skirt the boundaries of fairness on any service.


Credit card payment reversals keep merchants honest, they are disincentives to enact or continue unfair behavior against the consumer.


Those egg and sperm cells are quite alive before they meet.


However neither carries a full copy of a person's DNA. They're only "alive" in that they're biological.


Much social, political and technological progress happens because something/people instigated those with power into believing they might be inconvenienced or harmed.


It's the wrong one if it doesn't convert tabs to spaces.


I'm having a hard time thinking of an example of any of these that weren't about land or resources.


I'm no history buff, (apologies for the insta-Godwin): but was WWII fought over land or resources?

How about the US' involvement in Vietnam, that seems like an ideological war.


The Nazi narrative was all about reclaiming what was rightfully the German people's land and resources after they were depressed by the reparations from WWI. It was created to get people behind the party and it worked.

We got involved with Europe's affairs because we made a killing selling them military equipment to blow each other up. Then it started to seem as if the Nazis might take over the continent. To drive this point home, we sold weapons to the Nazis until 1941.

Pearl Harbor happened because we started an oil embargo with Japan.

Vietnam was a proxy war, it's inherently about not letting the enemy gain land or an ally in a certain territory.

There is something to gain behind every aggression and it is usually material and for personal profit to the those initiating it.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: