« first day (2775 days earlier)      last day (2398 days later) » 

00:00
@Code-Apprentice but...
a = np.array(list(map(lambda x: list(map(int, x)), (f'{i:010b}' for i in range(2 ** 10)))))

b = np.array([
    'hg', 'asd2', ';;s23', 'jjt', 'abc',
    '75', 'sadf', '091f3', '*&^', '%a1'
], dtype=object)

a.dot(b)
00:35
@piRSquared post it as an answer!
jpp
jpp
00:48
Can someone (everyone?) please downvote my answer: stackoverflow.com/a/50457927/9209546 ?
@jpp Why?
jpp
jpp
A little bit of psychology :)
Well, you forgot to say "Simon says".
jpp
jpp
hahaha
well, my psychological thinking works 2 ways. when one begs for upvotes (meta, here, anywhere) you get cynics who just downvote regardless.
on the other hand, if someone does downvote and your answer is half-decent, you usually get a pity-upvote, which nets to a good result.
so, net, you are better off begging for a downvote than an upvote.
You're not going deep enough into reverse psychology. Surely "pls no downvote me cuz im new to phyton" is a better way of getting a downvote, and therefore a pity upvote, than asking for a downvote?
jpp
jpp
01:00
@abarnert, very clever.. that has to be the way forward :)
wim
wim
01:23
@jpp asking other users to vote on a post (whether it be up or down) is poor form, recommend to avoid doing that.
 
2 hours later…
03:21
hey
 
2 hours later…
05:39
Morning cbg
hey ilja
just got 1k today
Congratulations
(I'll be gone in around 10 minutes)
how's ya day goin?
The usual: emails, emails and emails.
cool! Crazy that you are top 0.39 this year
I only got top 0.48 last week. That was my best record
05:49
I wonder if the top distribution looks like a power law graph, or in other words a few active ppl answering, with a long tail of those who answer every now and then, or just once.
I used to be read-only until early April
Though I did answer a bad question in the beginning (technically an incomplete one) I quickly got to 1k within around a month and a hafl
But I am mostly an answerer. All my answers are quite young so there aren't high-scoring answers. Most of them are also quite minor, as I am willing to help beginner users to get into it
Here I answered a question. I suggested review that this question is about Python3 because of the integer division. stackoverflow.com/review/suggested-edits/19795862
Note that / in python2 still means integer division when both operands are int. But in his program there is an error when he uses / to cut decimals, so only // is used, hence python3
Just remember that it is python3 because of the quirks with single-slash division, in his case he used true division.
@IljaEverilä The first place guy has 9K, the second place guy has 5K
That guy is gordon linoff and is topping charts every day
06:10
@Mulliganaceous I'm not sure if all those tags are necessary, though they don't hurt either. The is a good addition.
well decimal or division may be less important but the python 3.x is something to be added.
cbg/rbrb all in one... I'm never going to catch up on West World this way.
06:24
gotta go now. See ya next time!
Oh when you look at my reputation bar graph, I haven't pulled a single 100, but mostly 30s or 40s. And I still got top 0.48 for that week
Cabbage
@Mulliganaceous BTW, strictly speaking, // is floor division, since it doesn't always return an integer. Eg,
>>> 42.//10.
4.0
@jpp what wim said
0/
06:43
cbg
07:06
cbg-ning
I finally got some feedback from the OP of that "singleton" question:
Many thanks. The problem with this approach is that I have to assign all the methods from the class one-by-one to some local variable and thus I would still need to copy paste everything. I would like to avoid code duplication. — Jerry 30 mins ago
I thought of a way around that, but it involves updating globals(). I'm really not keen on doing that, and I bet Wim wouldn't be happy either.
globals().update({k: getattr(_myclass, k) for k in _MyClass.__dict__
    if not k.startswith('__')})
In python 3.something you could use a module-level getattr
@IljaEverilä Interesting concept.
Oooor you could use Guido's sys.modules hack and replace the module with your singleton. sys.modules[__name__] = singleton
07:16
Ooh that's nasty in an interesting way :D
¯\_(ツ)_/¯
I bet you could hack with the meta path / loaders to automate that.
Import allllll the singletons.
But that'd be really silly, compared to just importing the singleton itself...
@Aran-Fey Whoa. What Ilja said. Also, _MyClass isn't a genuine singleton anymore, but I guess that doesn't really matter.
You'd probably need to do that in another module or in the __init__.py though. If you try to make an import hook in the module itself, it's probably already too late
07:32
By "procedural style programming" I (and not my Boss) mean that he wants to use procedures instead of object methods. en.wikipedia.org/wiki/Procedural_programmingJerry 1 hour ago
Is there an actual difference between a function, method, and 'procedure'?
Not in python 3 I think
Is a procedure a function that doesn't return anything?
Look at turbo pascal to be sure ;)
OP probably means global functions instead of methods defined in a class
Yup, I looked at the question. do_stuff() rather than stuffdoer.do_stuff()
he also says the singelton/module has lots of methods, which he wants to import by name
I won't read why they don't just define them this way....
"Instead of A I want B but such that it does A"
07:41
following the 'more than 5 imports -> import module instead', someone should suggest from singelton_module import singelton_instance as msi
@Arne A method is a function that's an attribute of the object that it acts on. So all methods are functions, but not all functions are methods.
But the distinction is purely semantic, right?
@Aran-Fey That's the traditional definition. It's a big deal in some languages, like Fortran or Pascal. C made the "radical" decision to not distinguish procedures from functions, and most languages since then have followed that trend.
In fortran they're called subroutines
And functions are scarce
Well, depends I guess
@AndrasDeak True. I guess "procedure" is more a theoretical CS term, which Pascal adopted.
@AndrasDeak Kind of. In Python, it's easy to add a function to an object after the object's defined. In most languages, that's not easy, and may be impossible. It works in Python via the descriptor machinery: every time you do someobj.mymethod a fresh bound method is created.
Martijn talks about that stuff here: chat.stackoverflow.com/transcript/6?m=42359389#42359389
I keep wanting to do this, and finally I couldn't resist. ;)
I think the problem is on line 17. — PM 2Ring 59 secs ago
thefourtheye got that
Yeah. I didn't feel comfortable hammering it without feedback from the OP, or a 2nd opinion.
Oops. Sorry, I opened that link and realised that it is hammerable.
08:32
No worries.
08:42
What do we do about questions that are small variations of each other? There's find the most common element in a list and find the most common element, but in case of a tie return the first one. Leave them alone? Leave a link to the other question in the comments? Hammer one of them?
@Aran-Fey I haven't looked at the questions yet, but it sounds like the 2nd is a refinement of the 1st, so I'd leave a linking comment in the 2nd one.
Folks, there doesn't seem to be anything vaguely canonical on 'How to install specific version of pip?' or 'How to downgrade pip version?' Re stackoverflow.com/questions/50462578/…
and moreover that question says 'pip3' everywhere and nowhere 'pip', except in the tag
08:57
@smci Well, the modern answer is: "Don't install pip, it's a standard module".
@PM2Ring Cmon, you know it's as brittle as hell. Also other packages are quirkily dependent on its version.
yeah I disagree with you either, @PM2Ring
@smci I'd assume whatever the details are, it involves a venv
something like "make a venv, go nuts in there"
@Cosmo Huh? No. The question is simply what is the command-line syntax to upgrade/downgrade pip(/pip3) to a specific version.
(whether users should be doing that sort of thing in a venv is a caveat on the actual answer)
oh. This is an entirely uneducated guess but I'd say that pip itself probably doesn't support it
so it'd be something manual
@smci These days, I use python3.6 -m pip install some_package
09:04
Cosmo what on earth, if you'd clicked the link I have you'd have found pip3 install pip==9.0.3
@smci I think I already indicated that I hadn't but ok I will
I see
@PM2Ring I'm not talking about how to install a package with pip. I'm talking about how to install pip itself, namely a specific version (downgrade).
Yeah well based on that answer pip can treat itself as a package
(I could be dead wrong)
jpp
jpp
@Aran-Fey, On that one, I agree with @PM2Ring, I think it's a Related: XYZ link thing.
@smci I'm implying that if you use the pip module, then that's a non-issue.
09:08
@PM2Ring I suspect you're wrong, at least pip in Python 2.x was notoriously cantankerous and brittle. Wasn't aware 3.x was that much better.
Dinner time. rbrb
I don't have 2.7, and in 2.6 pip isn't a module.
Ok, so answers would bifurcate between 2.x and 3.x
I want to know: people prefer tensorflow or keras? What's the benefit(s) of tensorflow over keras?
thanks
09:20
@Niing depends on what you are doing
Keras runs on top of a ML backend, for example tensorflow
if you are using tensorflow yes or yes, might as well use it directly. Tensorflow's API is good, no reason to abstract from it just because
It happens to me once to have a question closed
I was very upset until I asked myself "why am I getting upset for a question when often management is treating me like trash?"
@Niing If I were you, I'd ask people why would they choose sk-learn over tensorflow, or the opposite, tensorflow over sk-learn.
@IMCoins no that's simply a function of whether their hardware target is CPU (sklearn) or GPU (TF, Keras etc.).
I have a custom Path class and I'm trying to define a "parent()" method, but getting an error saying "Path object is not callable". I've checked if "parent" word is a keyword, and it's not.
If I name it to parent1(), it works. So what's the problem here?
@akinuri sounds like you have a name clash with something else called parent in your scope. Probably one of your imports, or a custom function. Try rerunning that in a clean shell.
09:33
@smci Ah, silly me. I've just realized that I've set a property before, and now I'm rewriting it and turning it into a method.
@smci That's nice to know. I didn't think the difference was only "trivial", I thought there would be some performance issue between the two.
@IMCoins Yes, totally. There's a huge performance difference between 2048 (GPU) cores vs 8 or 16 (CPU). (For the set of ML tasks whose memory footprint can fit onto GPU, like NN, deep NN, GBM, parallelized RF). This is why sklearn is seriously losing ground (for that set of tasks)
Thanks for the information :)
(TPU is faster still. for that subset)
Can anyone help me come up with a very simple example of multiple inheritance, but with two independent base classes? (i.e. two classes that aren't designed for cooperative inheritance with a constructor that calls super().__init__(**kwargs), and aren't mixins)
09:46
In python36 I suppose ?
Was that directed at me? The python version doesn't matter; it can be a made-up example. It doesn't have to be from the stdlib or something
As far as I can remember, the super() function has different behaviour between py27 and py36. :p
Oh. Yeah, super() would throw an error in python 2 :P
re-cbg
@Aran-Fey There might be a Martijn answer that does what you want. Eg, stackoverflow.com/a/43955760/4014959
I suppose I can resort to using two nondescript classes with nondescript attributes...
09:56
Should this be answered, or is it a "problem that cannot be reproduced"?
doesn't look answerable
'your problem arises because that's not how this tool works'
I'd say it's a typo, if I was sure that your diagnosis of the problem is correct. Does opening the file in append mode really re-write the file headers? That would be stupid.
00000000  1f 8b 08 08 2e e7 03 5b  02 ff 6f 75 74 70 75 74  |.......[..output|
00000010  00 33 e0 02 00 12 cd 4a  7e 02 00 00 00 1f 8b 08  |.3.....J~.......|
00000020  08 2e e7 03 5b 02 ff 6f  75 74 70 75 74 00 33 e4  |....[..output.3.|
00000030  02 00 53 fc 51 67 02 00  00 00 1f 8b 08 08 2e e7  |..S.Qg..........|
00000040  03 5b 02 ff 6f 75 74 70  75 74 00 33 e2 02 00 90  |.[..output.3....|
@Aran-Fey It makes sense as a default behavior. zip files are huge, so you might not want to decompress them every time you append
Note the repetition of the magic number 1f 8b, among other things
10:02
Hmmm. I didn't know gzip had file headers, so I guess I should stay out of this :D
It's not exactly a typo, just a dumb thing to do. gzip allows you to write to a single file in "block mode". But it's best avoided if you have a choice as it's not very efficient, due to the header duplication.
There are other compressors that are designed for more efficient streaming compression, for when you really need that.
I'd wager that it also prevents more efficient compression due to not being able to analyze symbols from the whole.
The main problem with the linked question is the common bad practice of opening a file in append mode in a loop.
recbg :D
yesterday I got only 185 rep :F
Poor you.
10:05
and today I got repcapped already without answering any questions
@Aran-Fey gzip has file headers for many reasons; it is even possible to catenate gzip files
I was sure I had a mini-rant here recently about opening a file in append mode in a loop. Maybe it was on the main site...
append mode is awful :D
underspecified
@ShivamKumar Normal "w" mode is fine here. "a" mode is only needed if you want to append fresh data to an existing file. I sometimes see code where a file is repeatedly opened in a loop in "a" mode, a line is written, then the file is closed, on every loop iteration. That's very inefficient, and should only be done if the data must be written in a fragile environment where the system is constantly in danger of crashing. And even then you risk data corruption anyway... — PM 2Ring yesterday
If you need to constantly open/close a file, wouldn't it be better to just use a proper database ? If the program/computer crashes, the database will still be there, ready to use.
What was the canon for the "binding in a loop uses the last value"?
10:22
hi guys, quick freshman question - why am I getting 'list index out of range' error, when trying to get list value by accessing it like tags[typeid], where typeid is int(tag.type) (returns integer 1) and the same attempt with tags[1] works well?
@PM2Ring Thanks.
10:45
@witpok That shouldn't happen. Please post a Minimal, Complete, and Verifiable Example.
@witpok Hard to say without a MCVE. But what does repr(typeid) print?
10:56
Just published: github.com/python/peps/blob/master/pep-0577.rst - it's supposed to be a competitor to PEP 572 ...
@witpok You appear to be asking how the impossible happened. I submit it didn't.
@holdenweb I don't like
what's this "when the target is simple name" nonsense?
even the for loop index variable allows the target to be arbitrary assign target :D
ok thanks guys, I will try to replicate it elsewhere and the will get back.
@holdenweb also, "The follow examples would all still compile [...]" sounds a bit off
Try adding an assert typeid == 1 just before the statement that's causing you problems, and see if you get an AssertionError
@AnttiHaapala True, but when is that ever used in sane code? :)
11:02
@Arne Why? It simply describes current bahviour.
"It would still compile" sounds like the sentence is going to continue with a big fat "BUT"
For the record, I really do not like the idea of adding inline assignments to Python. Sure, I thought it was cool when C introduced it, but it can easily lead to unreadable code, and I thought that Guido was smart not to put it in Python.
Why does this is not enough ?

number_of_tries = 10
for _ in range(number_of_tries):
	try:
		#	if succeed
		break
	except BlehException:
		continue
(with proper indent, lol)
@holdenweb The typo, and that it talks about compilation in a PEP, which should be implementation agnostic
11:07
@jpp Why over-complicate things with csv.reader and StringIO? stackoverflow.com/questions/50465705/…
OTOH, your solution is the only one that handles lines with a key but no value.
@PM2Ring On the other hand all answers to that one seem to swap the relationship. OP's code would've produced {'andrew': ['george', 'judy'], 'fred': ['andrew', 'judy'], ...}.
@IMCoins What do you mean? What's wrong with that code?
@IljaEverilä Well spotted! :)
I blame the OP's convoluted logic. :) And my low caffeine:blood ratio.
Well they did accept an answer, so maybe they're not sure either :P
And that accepted answer has one of my pet peeves: the redundant .strip in line.strip().split(). And they've called it twice in that yamming dict comp. :(
jpp
jpp
11:17
@PM2Ring, StringIO is so I can test (and coz I'm lazy)
csv.reader is actually the same reason.. laziness. I first tried delimiter=' ' and realised it's probably not ideal.
@jpp Understood, but you can iterate over a list of lines. And if you really must use csv.reader, it's also happy to read from a list of lines.
jpp
jpp
@PM2Ring, good point, i'll do that
FWIW, I generaly do data = """A multi-line string""".splitlines() for example code like that.
@PM2Ring you can make csv reader take a list of strings?
jpp
jpp
@PM2Ring, Argh, I have to think about \n characters now
11:22
@Arne Yep. It's mentioned near the start of the docs.
data = '''\
a
list
of
lines
'''.splitlines()
I have tons of test code lying around with IOStrings because I thought you can't D=
If you want to retain the newlines, call .splitlines(True)
jpp
jpp
@PM2Ring, how do you get this working with with mystr as f syntax?
it kinda makes it redundant, no?
as splitlines returns a list?
@Arne From the docs: "csvfile can be any object which supports the iterator protocol and returns a string each time its next method is called -- file objects and list objects are both suitable. "
TIL reading the docu leads to better code
4
one to keep close to my heart
11:26
@jpp Fair point. I sometimes add a sentence: "I'm reading the data from a list of lines, to keep the demo simple." Presumably the OP knows how to loop over a list and how to loop over the lines of an open file.
jpp
jpp
@PM2Ring, understood, will remember for future
in general, it just comes down to laziness. just change open(...) to mystr and good to go
and it's usually closest to OP's code too
@jpp Yeah, StringIO does have that advantage. But if the OP is a newbie, StringIO may be a bit too advanced for them.
It's introducing a language feature that's not relevant to their problem, and they shouldn't have to learn about it just to understand your solution.
Of course, there are times when the OP needs to learn about StringIO or BytesIO because they're the appropriate tool for the job, but the OP doesn't even know they exist.
jpp
jpp
@PM2Ring, fair point. It's a toss-up between introducing StringIO versus removing with ... as f: ....
@jpp Maybe add a tiny bit of explanation: "StringIO lets us read from a string as if it were a file". I'd suggest linking to the docs, but the io module docs are evil, and I'd hate to inflict them on a newbie.
11:47
@Arne So you'd prefer "will all be syntactically valid"?
@holdenweb yes
jpp
jpp
@PM2Ring, yeh I added that disclaimer, agree the docs are terrible
12:31
Cbg
Need a bit of mentoring re SO questions. This question feels it needs my downvote because he didn't seem to research more on range() and debug his code enough. This is subjective though. Is that enough justification to merit a downvote?
Downvotes are often subjective
Hmm, if I downvote, then, based from what I learned in Psychology class, it could motivate him to get better and figure out the solution to such a relatively simple problem.
Given that OP is reading a Hacker Rank page that teaches how if blocks work, I'd be surprised if he knew where to look in order to determine what something does. For that reason, I gave him some slack.
I was thinking of the experience of being a beginner, of which he surely is.
So I guess, I should give him a slack too and give him some guidance instead.
Downvoting might motivate him... Or he might think "I think I'll just give up on programming entirely, if this is how the community is"
12:41
That really depends on the person, so I guess it would be better to give him guidance instead.
@SeanFrancisN.Ballais you can downvote and guide. We're not a tutorial service
If the question is crap, downvote it
Doesn't seem crap
Subjectively, it's between okay and crappy.
If his code didn't have an IndentationError, I might even have upvoted.
"Here's my code, I expect X but I get Y, what's the problem?" is better than 90% of questions, if the code runs
Given his rank, he might not even care for it or notice it at the moment.
Reminds me of the first question I have back in 2011 and I immediately got 6 downvotes.
12:50
You don't have to be the Mozart of code to notice "hey, my code looks different in my question compared to the code in my editor, maybe I should fix that"
You don't even need to know that Python has significant whitespace
Maybe he just ran and gunned the question.
He prolly just care at the moment that his question got posted and never checked for mistakes.
Good explanation, bad excuse
jumps on the roast-wagon
@SeanFrancisN.Ballais Oh dear. When I see code like that, where the OP is using a basic language tool like range in a totally weird way, I figure that they have some crucial misunderstanding. They could read the relevant stuff in the docs ten times, and it probably won't help. They really need some teacher - student interaction to set them straight.
And an SO answer isn't designed for that, although it may be possible to do it in Chat. Generally, the best you can do in an answer is to say "X doesn't work like that, you need to do Y".
12:56
He needs guidance indeed.
Tutorial.
Maybe not an answer but wouldn't a comment be enough?
When you're an absolute newbie reading the docs feels too tedious
Docs won't teach you a language
On a similar note, I guess that this OP has heard that classes are good, but he doesn't really know what he's doing, and it's hard to know where to start to help him. Apart from the good old "nuke the entire code from orbit, it's the only way to be sure".
12:58
@AndrasDeak How so?
Hmm, so general behaviour is that when a question seems to be answerable with a tutorial, then it should be downvoted and/or given a comment?
@RodrigoSilva would you learn c++ from the standard? :P
@RodrigoSilva, for me, docs only give you information as how a specific construct or keyword works and how you can use it. It doesn't teach you how to use a language properly.
@SeanFrancisN.Ballais I never said that. People needing a tutorial need a tutorial
And Andras just gave a much more succint answer than me.
13:00
Then again superconfused questions often should be closed
Oh right, I meant docs in a broader sense. But sure, I see you what you mean.
We used to have a close reason "lacks minimal understanding"
If you're a newbie with a crucial misunderstanding then simply reading the docs by yourself is of limited value because you'll continue to misunderstand what the docs are telling you. If you're not a newbie, you should know how to test your knowledge by writing little bits of code. And if the code doesn't do what you expect, you keep trying stuff until it clicks. But newbies don't have a big enough foundation to do that sort of thing with confidence.
Must have been great
People usually do need structured guidance in any discipline
13:02
Yup
What happened to the close reason? Why was it removed?
Abused too much
And they can find that structured guidance somewhere else, because this is a Q&A site, not a mentor-finding site
Either that or purged in The Summer of Love. I missed it
The same goes for the old "Too Localized" close reason.
13:03
@Kevin I agree with that, but I do find that a mentor-student kind of relationship is extremely beneficial.
Not necessarily holding your hand in every subject
tutorials and guidance are important but not our duty here
I don't care much for arguments of the form "we must allow bad behavior X, because otherwise programmer need Y will go unfulfilled". It isn't Stack Overflow's goal to fulfill all programmer needs.
Just wondering. What if SO creates a feature where users get to connect to other users for mentorship?
@SeanFrancisN.Ballais tried and failed
Why did it fail?
13:05
Well, it was mentorship for asking a non-crap question
Google the mentorship project on MSO
If it's a simple, common misunderstanding, eg for x in mylist: a = mylist[x] then an answer can explain why that's wrong, and the OP and many future readers can benefit. But if it's some weird thing that the OP's done that others are unlikely to do, then writing a mini-tutorial is only going to benefit them, and so it's not a good fit for SO.
Too much effort to help people ask questions, let alone teach them programming
Clueless users outnumber everyone else a hundred to one, so any 1-on-1 system will be swamped by demand
@PM2Ring Hm, isn't the point of SO to write mini-tutorials for specific, context-dependent issues?
13:07
@RodrigoSilva hell no
When you have a "mini-tutorial" the question isoften too broad
I see why it failed. New users might treat it as the alternative avenue to ask questions.
Which, potentially, could help others as well
Mentors were good at only helping with asking, but even in the experiment it was too much
@RodrigoSilva, isn't the point of SO is to provide quick (?) answers on more or less problems that could be or is affecting a lot of people?
@AndrasDeak I don't see the correlation. You might need a mini tutorial for something that's truly specific, for instance, I remember one really popular SO questions being something along the lines of "why is an array faster..." and the guy who answered went to town on branch prediction and all that
I might miss have some actual SO goals there.
13:11
@RodrigoSilva yeah, hence "often"
@RodrigoSilva People search SO for good answers. The questions are "merely" a catalyst for those answers, and a way to help people find the answers. If an answer only helps a single person, it's not of much value to the site. Think of the question as illustrating a specific case that the answer is providing a general solution for.
A well-formed question may be given a comprehensive answer. The problem is when a question can only be answered by writing a tutorial
If you haven't already read it, I urge you to read Optimizing For Pearls, Not Sand. Admittedly, the attitude of the powers that be has shifted a little since Jeff wrote that article, but it's still a strong principle for many SO regulars.
@PM2Ring Hm, I can partially agree with that. Though, should we take a question's chance of incidence (is this a word in English?) as our metric of a question's worth?
I don't think questions answerable by "read a tutorial" are helpful. Users should come here once they have a basic understanding
13:15
@RodrigoSilva Think of it this way: Will the answer be useful to others with similar questions? Will there even be others with similar questions?
@PM2Ring Sure, makes sense. That's a good thumb rule.
stackoverflow.com/questions/3579568/…. No longer asks for a library recommendation.
For example, take one of my first questions on SO: stackoverflow.com/questions/18704612/… I could have easily found the answer somewhere in the documentation, but it helped around 4k people. Does that make it valid? I definitely didn't check all SO question formatting guidelines.
ps: don't judge pls
A classic example is a question where the OP is looking for a regex. Sometimes that leads to good answers because they can be helpful examples to most people learning how to do regex stuff. But in many cases it involves writing some unreadable regex that's only of use to the OP, so it's not really a good question.
I can't argue against the RegEx questions, that's exactly what I think as well :P
13:34
'morning cabbage all
@WayneWerner hey
@WayneWerner, cabbage! It's evening here already
@PM2Ring Great, and now I'm reading on skeptics.SE about torture
\o back-from-"long"-weekend-cbg
re-cabbage all, bugrit.
13:46
@PM2Ring, this question you linked earlier? It gave me the chills to find out that he is using global vars.
And is it me or did he had too much of Java OOP-isms?
Isn't there a bit too much classes?
Sam
Sam
In what instance should I favour building a script into a class over a module which just gets imported? I've wrote two versions of code which do the same thing (bar the class version returns a dict, which I can easily do in the module as well..) Could someone please tell me which implementation they would prefer? https://gist.github.com/samjtozer/469461bb81e941d63f280b19e77147ab.
https://gist.github.com/samjtozer/a3fff81fc44f1baefda80e6dde9f6e87.

« first day (2775 days earlier)      last day (2398 days later) »