« first day (3168 days earlier)      last day (1783 days later) » 
00:00 - 13:0013:00 - 00:00

12:00 AM
We had to memorize every capital back in high school, but the memory is very patchy to say the least
 
okay, appears the ETL is going to take longer than planned, so I'm going to puppy nap and rbrb, have a good snooze yourself @Andras (and thanks for entertaining me)
 
Thanks yourself ;) Rhubarb
 
@AndrasDeak I hear you... just the other day I actually had to google something that I knew I knew... I just couldn't recall it... weird how the brain works (or sometimes doesn't).
 
12:22 AM
sighs... this is going to take a while 2019-06-19 01:18:58 [scrapy.extensions.logstats] INFO: Crawled 33843 pages (at 636 pages/min), scraped 24614 items (at 120 items/min)
 
12:36 AM
cbg
 
12:47 AM
Hi all, quick question about RegEx
 
hello
python regex?
 
I have a few files in a directory: One called READ.ME and one called READ.ME.NORMALIZED
well im writing a bash script haha
anyways, Im trying to match ONLY to the file READ.ME and not READ.ME.NORMALIZED
 
@AndrasDeak Didn't you say Rhubarb so you mean you're off the computer...
 
unfortunately I tested this regex in my script: "READ.ME$" and it didnt work
I thought the $ symbol of regex means "the end", AKA, no more characters after this pattern
but its not working haha
 
12:49 AM
it usually means that. haha.
 
1:09 AM
@U9-Forward don't be weird
 
ouch
 
yawns
 
hey pupperoni
 
howdy... "pupperoni" sounds like I'd go nice on a pizza or something? :p
 
meant to say "pupperino" but it came out as a typo, decided to keep it cuz it sounded nice
you do love yourself those pizza rolls.... or were they sausage rolls?
hmm. . .
 
1:17 AM
did someone say sausage roll?
 
how cute, it's a long boi
 
I should get on the phone to the RSPCA or something :)
 
Haha it's funny
 
"no sausages were harmed in the making of this sausage roll"
 
1:57 AM
rbrb
Rhubarb
 
2:15 AM
so being rescued by code is a fad, apparently
 
wim
2:54 AM
 
3:29 AM
(PS for anyone confused by a random picture of Toby Maguire, it'll make more sense if you know his dialogue in this scene)
 
4:07 AM
Which movie?
 
4:39 AM
cbg
 
peace
 
Ammn yeah
 
recbg
 
Weren't you just here few seconds ago, and came back lol
 
5:04 AM
@cs95 is it "Umm... I thought I ordered a Chinese... what the hell is this stuff?" :p
 
5:42 AM
@JonClements not quite :P
he delivers 10 boxes of pizza and at the same time delivers this piece of gold "pizza time :)". Unfortunately he's 3 minutes late so he doesn't get paid and gets fired from his job as a pizza delivery guy.
can we get some Fs in the chat for this poor soul
 
F
 
F
 
I see some people using the word codes when describing their python program on the question, I wonder where the plural of code came from
And should it be code or codes?
 
5:54 AM
@DeveshKumarSingh Yeah, "i have the following codes"
 
nowhere near as annoying as "a soft" for software
 
Yes, I sometime want to tear my non-existent hair out when I see codes in the question
 
"codes" feels like an indianism, a lot like the overuse of "logic" in sentences
 
yeah, we sometime overuse some words, but we are not the only ones, California is full of people using "like" in every 3-4 words of a sentence
 
"doubt" for "question" is the one which sticks out to me
 
5:59 AM
 
I should probably mention I'm also from India so I can say these things about our people :P
@tripleee exactly
 
@cs95 Haha, from namma bengaluru
 
yes, did I mention that? Hmm
 
Jun 5 at 15:54, by cs95
from Bangalore, actually
 
Ah, that's right. "Like" is a very american (actually millennial) thing
 
6:01 AM
Dec 31 '17 at 12:40, by cᴏʟᴅsᴘᴇᴇᴅ
No, I'm from Bangalore.
here too :)
 
But I've also had instructors from Kerala who like using "like" in sentences. I once had a teacher who said it so much, we made it a habit of counting the number of times she said it.
 
@cs95 New filler words coming in as new generations come in
 
I think her record was 126 times in one class. Two weeks later she broke it with 134.
I call em crutch words. They give you an extra second to think of something useful to say
 
Yes, every language has them, I know of a mandarin crutch word which sounds offensive in english
 
she once came on the local news to do an interview. She said "like" 13 times in a 3 minute span XD
 
6:03 AM
It was also in a russell peters joke
 
@cs95 discourse particles
 
6:21 AM
In german they're called filler-words
and there is one that really drives me up the wall. It's "quasi", and it's just italian for "almost". Imagine if people describe what they want or think, and just throw in an "almost" every now and then. Which is not only useless, but often enough just plain wrong =(
A attribute 90% of my eye twitches to that word alone
 
so a quasi in english or a quasi in german?
 
in german, but i've heard those same people use it in english as well
 
@Arne ha! one of my pet peeves of the (swiss)-german language! also here many people put a "wie" (~like) in every other sentence. this is irritating! sometimes i advise them to replace it with "quasi"... sometimes that helps...
 
huh, didn't run into that one yet. Something to brace myself for when I get the chance to go to beautiful schweiz again =D
 
hurry up! my mission is to eradicate this awful habit. (actually i gave up... so no hurry).
 
6:40 AM
I will keep fighting the good fight, for as long as I live! feel like it.
 
I'm getting un-motivated just listening to you guys
 
nah, motivation is a resource, can't afford to put all of it into things like language preferences
 
7:04 AM
this is attracting a bad answers, the source which generates the bad json needs to be fixed
any suggestions on how to proceed
aah, chuck it, the OP accepted an answer
 
didn't we have a dupe in chat not too long ago where a valid fix was to just parse it as yaml?
 
yes, but here the string don't have quotes, so it's not a json
 
ohhh
 
I usually just downvote these "help me with reading <Format X> from <gibberish Format Y>"
the spec for JSON and friends is not so difficult to comprehend
usually it just shows that people do not care about solving the problem themselves
 
Cabbage
 
7:14 AM
cabbage
@MisterMiyagi yeah, that's what I did
 
Hey @MisterMiyagi, thank you for your great answer on the memory usage question.
 
@ReblochonMasque my pleasure, I like these kinds of questions
 
hehe, I like your kind of answer! ;)
 
@MisterMiyagi you're using namedtuple from typing instead of collections. Is that correct? I thought typing classes should only be used for type annotation, even if they alias their reference class
good post though
 
the typing one allows to use class syntax, the collection one does not
AFAIK
 
>>> type(collections.namedtuple), type(typing.NamedTuple)
(function, typing.NamedTupleMeta)
generally, I dislike NamedTuple, but it was the easiest to demonstrate the point
 
@DeveshKumarSingh Hammered
 
Aah, bad dupe target I think, better might have been stackoverflow.com/questions/30407576/… IMO
 
@MisterMiyagi then the typing one is way better for sure. And good to know that typing has uses other than ... typing :p
 
Agreed, typing.NamedTuple is better; namedtuple is a wart!
 
7:33 AM
@DeveshKumarSingh It looks ok to me, but I'm not fully awake. :) But I added your target.
 
cabbage @PM2Ring
 
@PM2Ring google tells me its 5 PM in Australia
 
@Arne I usually just use attrs instead of NamedTuple, so...
 
What's better
for blah:
    if val != cond:
        #do stuff
for blah:
    if val == cond:
        continue
    else:
        #do stuff
in these two cases, what's more idiomatic/pythonic
 
@DeveshKumarSingh Yes. I have a weird sleeping pattern, partly due to spending too much time on Stack Exchange.
@DeveshKumarSingh Definitely the 1st one.
 
7:41 AM
I like the second one @DeveshKumarSingh, I even wish continue could be used outside a loop
Longer to write, but prevents second takes upon reading
 
@PM2Ring any particular reason?
 
@cs95 Using "like" as a filler word has a long history. I guess it goes through cycles of popularity. It was popular in the 1950s with the beatniks, and in the 60s with the hippies. It had a resurgence in the 70s, eg Valley Girl.
 
@DeveshKumarSingh it's infinitely nicer than the 2nd.
 
@ParitoshSingh nicer in readability ? since both end up doing the same thing, I also like the first, reduced two extra lines
 
yep. clarity of purpose. i don't need to mentally parse an if and else before realising what the code wants to do.
 
7:49 AM
Although I like continue the recommendation is to use it sparingly. If you can avoid it without making the logic too convoluted or nested you should do so. The rationale is that you should try to minimize the number of execution paths through the code. The more paths there are, the harder it is to analyze & test.
 
Sam
@Arne Can I pick your brain regarding web app setups again :p
 
@PM2Ring whoa! a Zappa reference on SO! made my day!
 
@MisterMiyagi any thoughts on dataclass?
@DeveshKumarSingh How about this:
for val in bla:
  if val != cond:  # this is called an if-guard
    continue
  # do stuff with no additional indentation levels
@Sam sure, but today will be a in bursts between busyness. Just open a room =)
 
@Arne Completely forgot about that
 
@hiroprotagonist My pleasure! I just noticed that Valley Girl was released in 1982. I was sure it was a little earlier...
 
7:58 AM
I like that too @Arne
 
@DeveshKumarSingh It's essentially your second one while skipping the else, I really like it. But I also got used to seeing lots of contiues in my loops and returns in my functions, so it's not confusing to me any more
 
@Arne but it adds up another execution path which PM 2Ring pointed out
 
not really... both variants have 2 execution paths (if is True or if is False)
 
you mean the first example?
 
8:02 AM
all 3 examples have 2 paths, actually
 
Just that the if False path is empty in the first example, equivalent to a pass ?
 
yeah
 
@hiroprotagonist I haven't linked much Zappa stuff here, but you'll find a couple in the transcripts. I only have 3 Zappa CDs, but a guy I used to jam with in the 80s had a huge collection of Zappa stuff.
 
Hi! Why the first print is executed, showing the id, but the second one is not executed?
print(article[constant.ID_KEY])
if hasattr(article, constant.ID_KEY):
      print(f"Article {article} has the field _id")
      del article[constant.ID_KEY]
 
@PM2Ring (...counting) ~40 albums + some bootlegs... i was quite a fan.
 
8:08 AM
@QuicoLlinaresLlorens Why not do if constant.ID_KEY in article instead
 
@QuicoLlinaresLlorens Because article doesn't have an attribute like that... it has a key like that.
 
Also as per doc docs.python.org/3/library/functions.html#hasattr is used for object attributes, and not for dictionary keys like constant.ID_KEY
Also as per this hasattr does not test for members of a dictionary. Use the in operator instead
 
not .has_key anymore, that's depreciated. Just use in
 
@DeveshKumarSingh I get this: "illegal target for annotation"
 
What is article ? is it a dictionary? What does type(article) gives you
 
8:13 AM
what did you write?
 
constant.ID_KEY in article:
      print(f"Article {article} has the field _id")
      del article[constant.ID_KEY]
 
You forgot the if
 
@PM2Ring By any chance, are you watching the cricket world cup?
 
@Aran-Fey True, but I was giving the general rationale to minimize the use of continue.
@DeveshKumarSingh No, I've never been a fan of cricket. Or much other sport, for that matter.
 
8:21 AM
@PM2Ring aah okay!
 
8:39 AM
@Arne dislike them. they look like a struct, but are the regular bog-slow __dict__ mess
I know that Python isn't bothered with the entire type/shape correctness stuff, but cases like dataclass just feel like a waste
doesn't help that dataclass showed up roughly at the time I was testing the waters with Julia...
 
8:54 AM
there's also the problem that in a language like Python, class-level type annotation are practical but subtly wrong
 
how so?
 
@dataclass
class C:
    x: int

class D:
    x = 1
x doesn't mean the same here, even though both are declared as a local integer
 
I'm not following... of course they're not the same thing; why would they be?
 
the correct type for C.x would be a property[int] or member[int]
 
cbg
 
8:58 AM
We aren't annotating the type of C.x though, we're annotating the type of C().x
 
dataclass uses the annotation of C.x as a standin for C().x
but we annotated C.x
 
Oh, now I see what you're getting at. Yeah, you're right
 
I know it's pedantry... but it just bugs me :/
too much exposure to metaclasses does that to you...
 
I don't think dataclass is doing anything wrong, though. It's just that class-level annotations are intended for instances, rather than the class itself. It's weird that annotations have a different meaning in class scopes, but that's not dataclass's fault
 
as said, it is practical
both typing and type annotations have made my code a lot better
 
9:20 AM
Can anyone suggest is there any alternative tool like POSTMan in PHP or Python
 
if you're in python, you can directly make and send requests using the requests library.
i don't know enough about PHP to comment on it, but im sure it should have the ability to make requests just fine as well.
 
I know python but if any tool already developed it can save my lot of time.
 
In [26]: li = [1,4,'a', 6,3, 'b']

In [27]: min(item for item in li if isinstance(item, int))
Out[27]: 1

In [28]: min([item for item in li if isinstance(item, int)])
Out[28]: 1
I want to calculate the minimum of integer values in the list, first approach uses a generator, and second approach creates an intermediate list and then calculates min on it
So the advantage of first over second is the non-creation of the intermediate list, which is the space saving advantage, but the time complexity will be the same for both, is that correct?
 
correct
 
any other advantages?
 
9:26 AM
no not really. space and time usually capture just about all advantages/disadvantages that one usually thinks of. the other criteria can be things like readability, which i don't think matters here.
 
The list is likely marginally faster because AFAIK iterating over a list is faster than iterating over a generator
 
list comprehensions are generally faster
 
do note though, that while it's same order of time complexity, the iteration would be faster in the list comp
 
okay so it's a tradeoff between faster iteration in list comp vs the extra list we are making
 
in case of doubt, choose the generator
the isinstance check is already very costly, so the generator/list difference does not matter that much
 
9:28 AM
and if you short-circuit (e.g. find the first element that satisfies a condition) you might not have to go through all the elements. that of course it not true for min.
 
space savings usually apply
 
Just for adding, this answer by Raymond proves that listcomps are faster.
 
@U9-Forward This answer is for join, where we need all elements, whereas in min, we only need one pass, both in case of list comp or gen exps
 
@AndrasDeak Chrome :)
 
9:30 AM
@AndrasDeak 404?
 
link works fine for me. thanks for heads up. the url was: mozilla.org/en-US/security/advisories/mfsa2019-18
 
@ParitoshSingh it works for me as well
 
let me try in chromium...
 
@MisterMiyagi why is isinstance costly? Because it goes through a list of objects to compare with the argument? O(n) ?
 
Nope, chromium can't load it either
 
9:32 AM
@Aran-Fey no idea!
 
guess it's not meant for EU
 
blocked sites don't give 404 errors right?
 
@DeveshKumarSingh I'm 300 km from Aran probably
Which is to say, all EU
 
@AndrasDeak aah okay, I forgot, Budapest to Vienna
 
Budapest to ?
Austria is long East to West
 
9:35 AM
I mean the distance between where you and Aran live, his profile says studies in Vienna So i assumed so
 
Well, I wouldn't attend Vienna University of Technology if I lived in Vorarlberg (:
 
@Aran-Fey haha, I thought so :)
 
Oh, I just see and remembered Austria from mobile :)
 
> This can allow for an exploitable crash.
What, that's the worst that can happen? Firefox crashes all the time anyway
 
9:37 AM
"Exploitable" as in arbitrary code execution I think
 
@Aran-Fey depends on how you use/abuse it i suppose. :P Mine is very well behaved.
 
@hiroprotagonist hey, welcome
 
I stopped using firefox quite a while ago! It looks ages to even load
 
@ParitoshSingh Maybe I installed too many addons/userscripts ¯\_(ツ)_/¯
 
that would do it :P
 
9:40 AM
Arch linux doesn't have the new firefox version yet... guess I'm screwed
 
I have firefox dev edition, it's great
 
@AndrasDeak cbg!
@DeveshKumarSingh firefox has improved a lot in its last few iterations...
 
@hiroprotagonist aah okay, btw your username is interesting, it has a japanese first name
 
@DeveshKumarSingh from the Neal Stephenson novel Snow Crash... (the full name is indeed Hiroaki Protagonist).
 
@hiroprotagonist Got it! Thanks
I wonder why some comments automatically get deleted when you flag them?
 
9:55 AM
do they automatically get deleted? could be a coincidence.
if you're looking at a fresh question, it's possible some mod is too at the same time.
 
@DeveshKumarSingh keywords like "thanks" and expletives can do that
Or if 3 people red flag it and you're the third
 
Yes, as per this meta post marking some comments as no longer needed cause them to go through some regex rules
In [32]: li1 = [1,2,3,4]
    ...: li2 = [5,6,7,8]

In [33]: [item1 + item2 for item1, item2 in zip(li1, li2)]
Out[33]: [6, 8, 10, 12]

In [36]: list(map(operator.add, zip(li1, li2)))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-36-143b0aeecd0b> in <module>
----> 1 list(map(operator.add, zip(li1, li2)))

TypeError: add expected 2 arguments, got 1
Why does one work and the other doesn't? Is this because zip gives you a list of tuples which we unpack and add in the first case, but not in the second case?
which explains why this works
In [41]: list(map(lambda t:t[0]+t[1], zip(li1, li2)))
Out[41]: [6, 8, 10, 12]
 
you'd need operator.add(*item) for each item. Try starmap perhaps
 
@AndrasDeak To unpack the tuple, got it
 
>>> from itertools import starmap
>>> list(starmap(operator.add, zip(li1, li2)))
[6, 8, 10, 12]
 
10:07 AM
Yes, it works Used instead of map() when argument parameters are already grouped in tuples from a single iterable (the data has been “pre-zipped”) It is pretty well explained in the docs
 
I wasn't entirely sure because I've never used it
 
But your hunch was right! me neither
 
Proving once again that the "functional style" is hard to read
 
in python, definitely
oh yeah, @piRSquared is missing out ^
 
map(function, iterable, ...) Return an iterator that applies function to every item of iterable, yielding the results
 
10:10 AM
haha, I just realized that the firefox dev edition I use wasn't vulnerable to begin with
 
So the function is applied on the tuple, and not the unpacked tuple which might have given the arguments to add
 
it spares you another layer of lambda that does lambda args,fun=fun: fun(*args) or something like that
 
you mean the builtin map
 
actually, it can probably be "fixed" with a decorator that unpacks the args :P
@DeveshKumarSingh yes. And I meant starmap spares you the additional function layer that would be needed with builtin map
 
@AndrasDeak got it
@AndrasDeak is there a decorator like that
 
10:15 AM
@DeveshKumarSingh If additional iterable arguments are passed,function must take that many arguments and is applied to the items from all iterables in parallel.
So you don't need zip
 
ah, right
 
In [46]: list(map(operator.add, li1, li2))
Out[46]: [6, 8, 10, 12]
you are right
 
:)
 
well the document was missing a concrete example, otherwise I would have never understood what that line means
 
10:27 AM
It would be very nice if everything in the Python docs were illustrated with examples. But since that's not the case, when you read the docs you need to make up your own examples & do a few experiments. That usually helps, IME, but I agree that it's not always easy to do if you don't quite get what the docs are trying to say.
Some parts of the stdlib docs are particularly bad. Eg, some of the XML parsing docs seem to assume that you're familiar with how Java does it. With docs like that, I tend to give up and try a different module.
 
10:43 AM
@DeveshKumarSingh without an if clause, a generator expression is about 10% slower than a list comprehension. The if isinstance check alone adds about 100% - 150% on top of the list comp.
basically whenever you have a non-trivial expression, the performance difference of list to generator is negligible
 
i.e. unless your program is 100% listcomps, the difference is negligible
 
@PM2Ring Yes, and as you said, sometimes the language is complicated, so it's hard to think of examples
Why does the first one works and the second one doesn't ?
for idx, (key, value) in enumerate(dictionary.items()):
vs
for idx, key, value in enumerate(dictionary.items()):
 
10:59 AM
because your iterable contains two elements per step
the id, and the item
the item also contains two elements
 
Aah okay, so it is implicit from how a tuple of enumerate(dictionary.items()) look like i.e (0, (1, 2)) for e.g which is different from (0,1,2)
 
Yes
 
Got it, thanks
you guys do know a lot about little things in python :)
 
@DeveshKumarSingh note that those two can never be valid at the same time
 
@AndrasDeak Sorry I did not get it
 
11:04 AM
You asked "Why does the first one works and the second one doesn't ?" which sort of sounds like you'd expect both of them to work. I'm saying that those two things can never work at the same time.
 
So the stuff after for has to match the pattern of whatever the iterable yields. Of course, you could do for stuff in enumerate(dictionary.items()): and on the next line do idx, (key, val) = stuff
 
or for idx, item in enumerate(...): and then key,val = item
when you need the item more than the key-value separately it might make sense not to unpack it instantly
 
@AndrasDeak Aah okay, that makes sense, I was actually asking about why does one of the syntaxes work and the other one doesn't which i guess is clear now
 
@DeveshKumarSingh Partly that comes from writing lots of little examples to test stuff we read in the docs. ;) And partly from seeing clever things in good code. And partly from hanging out here and discussing these things.
 
Or for (idx, (key, value)) in enumerate(dictionary.items()): but I think the outer brackets are implicit
 
11:07 AM
yes, parentheses are optional
unless they are not
 
@PM2Ring True that, the code I write for my job doesn't use a lot of these things, so I end up seeing them on SO, and i get clarification from either there or here
 
Yes, those outer parentheses aren't needed. A tuple is made using commas. You only need the parentheses if it would be ambiguous without them, or for making an empty tuple.
 
and in comprehensions :'(
>>> [k for k in 1,2,3]
  File "<stdin>", line 1
    [k for k in 1,2,3]
                 ^
SyntaxError: invalid syntax
I never understood why that's valid in a for loop and invalid in a comprehension. Probably has to do with optional trailing conditionals, but still
 
AFAIK that's because you are in a [], so the , might also indicate the next element
 
oh, perhaps because of conditional expressions
@MisterMiyagi no way, the first element can't be a comprehension
 
11:10 AM
[(k for k in 1),2,3]
[k for k in (1,2,3)]
 
parentheses for genexen are only optional inside function calls with a single arg
hmm, conditional expressions can't be it either because there would have to be an else clause
perhaps it would just be too cumbersome to implement
 
@MisterMiyagi But the first listcomp is invalid, since you cannot iterate on an int
 
syntax doesn't know what is iterable or not
 
@DeveshKumarSingh we're talking about... that ^
 
[a for a in 2] is valid syntax
even though it does not work
 
11:13 AM
valid from a python grammar perspective?
 
I suspect there's a rejected feature on bpo for this
@DeveshKumarSingh yes
If you run it and get anything other than a SyntaxError it's syntactically valid.
running that you'd probably get a TypeError because ints are not iterable
 
@AndrasDeak Yes, I thought so
 
@AndrasDeak could be, "parentheses are optional" is not the default but an explicit exception
 
@AndrasDeak Also because the lexer always moves forward, it can't backtrack. But I'm not quite sure how that applies here. ;)
 
I guess there is also the problem that just because it would be obvious to the parser does not make it obvious to puny humans
 
11:15 AM
lol, "tuple comprehension", what a hack. Another one for @piRSquared
 
So it's just unpacking of a genexp into a tuple because of the , in the end?
 
yes
@MisterMiyagi I don't think that's related, to be honest
 
@AndrasDeak There's a great rhettinger answer on a "tuple comprehension" question.
 
Got it, I guess that's too much information about python nitty-gritties for today for me, rbrb
 
@AndrasDeak it was legal to say return (*(1, 2), *(3, 4)) but not return *(1, 2), *(3, 4)
 
11:18 AM
MisterMiyagi's example works if we change it to [(k for k in x),y,z]
 
@MisterMiyagi OK, but we're talking about implicit parentheses with generator expressions, specifically
 
@AndrasDeak just saying that "implicit parentheses" are not the default
 
Or maybe I'm getting it confused with this classic answer: stackoverflow.com/a/9061024/4014959
 
@MisterMiyagi yes
 
List comprehensions no longer support the syntactic form [... for var in item1, item2, ...]. Use [... for var in (item1, item2, ...)] instead.
but no reason why is stated :/
 
11:26 AM
@MisterMiyagi Ah, ok.
 
11:47 AM
The time complexity of reversing a list by li[::-1] is O(n) right, where n is the length of the list?
 
cbg fellow Lifeboat/Lifejackets
 
@DeveshKumarSingh yes
 
12:10 PM
does anyone know a dupe for "how do variables work in Python?" stackoverflow.com/questions/56667280/…
 
the closest thing I know of is stackoverflow.com/questions/575196/…
 
I feel like answering the topic, but frankly the question is of rather low quality :/
 
Give me a minute to go at it with my chainsaw
Is that better?
 
that's one heck of a chainsaw!
 
I hate when questions have too much noise... all those type(a) and id(a) outputs weren't adding anything useful. So that's all gone now.
On second thought, maybe the use of is is too confusing for newbies. Let me change that to a simpler example with ==
 
12:30 PM
Anyone have an idea, why pylint gives a different result on different platforms with the different python version on the same source code?
 
Never mind, == doesn't work. Replacing those object()s with some values that are prettier to look at will have to do
 
@MisterMiyagi ah, nice catch, thanks
@AmanJaiswal how different are we talking? There are syntactical changes across python versions.
 
@AmanJaiswal It is customized as per your IDE settings too. (If by platform you mean IDEs)
 
getting different results on same python version and linux and windows as well
I am running on Windows CMD and ubuntu terminal
with my modified pylintrc file
 
oh, so the results are different, I see!
why didn't you say so
The most common reason for differences is that something is not the same.
 
12:44 PM
but how can I check this?
also on some machines I am getting bellow error:
"UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 16: ordinal not in range(128)"
 
@AmanJaiswal this error is not a pylint error, but an error which comes when you run the python script
 
but pyhon is running fine
 
sorry I didn't understand
 
12:57 PM
My python script is working fine it does not gives any error
but if trying to check pylint score getting that error
 
Then where did "UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 16: ordinal not in range(128)" come from, what's pylint score? what command do u run to get it?
 
pylint –rcfile=pylintrc source
here pylintrc is my customized file and source contains python modules
 
00:00 - 13:0013:00 - 00:00

« first day (3168 days earlier)      last day (1783 days later) »