« first day (2501 days earlier)      last day (2430 days later) » 
03:00 - 17:0017:00 - 00:00

3:11 AM
How can I fix 'utf-8' codec can't decode byte 0x89?
 
DSM
As PM2Ring said, it sounds like you're trying to decode some bytes to text, but the data you passed isn't valid UTF-8.
What's it encoded in?
 
mmm... I am not sure. I am open() a png, taking an slice of around 4000 bytes file.read(), adding to the slice |/! and !\|, .encode(), sending it with socket.send() and then .decode() and finally I get the error.
 
DSM
That doesn't make sense to me. If you're reading bytes, there's no encoding. Your "adding to the slice" must be concatenating bytestrings, but then since it's already binary data, why would you encode it? I'm missing something.
 
mmm, let me check that
No, I am not encoding it because it's already bytes, I am only encoding the |/! and !\| and the I add it to the slice.
 
DSM
So when you said .encode(), you were wrong?
 
3:25 AM
I wasn't expressing me right. I am only encoding the "to-add" string not the whole thing because that is already encoded.
 
DSM
It's not encoded, in the sense of strings, anyway. So there's no need to decode it after you get it back.
 
Ok, I will try
I can't believe it!!!
It worked!!!!!
Thanks!!!
mmm, I have just transfered a file.zip of 2.572.694 bytes with sockets and the new file has 2.573.555 bytes... and I can't uncompress it....
 
4:32 AM
eclipse cbg
 
eclipse? Ah, hi.
 
There is a total solar eclipse across the United States tomorrow morning.
I happen to live right in the so-called "path of totality"
 
ah, ok, but I am not in USA... :(
 
I guessed as much.Many people from around the world know about it and are travelling this weekend to see it.
My little town of about 60k people is overflowing with visitors.
 
hahah
 
4:35 AM
I heard predictions of up to 500k visitors. No idea how accurate those are, though.
 
Wow
 
The local businesses are definitely much busier than normal. The coffee shop a block from my apartment is not usually open on Sundays at all and they were very hopping today.
 
That is a lot
 
we haven't had the complete chaos that some of the doomsayers predicted
at least not yet
 
Bye, I am going to bed, is quite late for me.
 
4:52 AM
recbg
 
5:03 AM
cbg, Antti
 
5:23 AM
Morning cbg
 
5:41 AM
HI,
 
@AkshayKandul cbg
 
anyone has any idea about pymongo
 
I have an idea. It is a driver for mongodb. I don't use mongodb, therefore I don't use it
 
what is best, applying list on pymongo.find query or using list comprehension ?
 
is there a particular reason to use mongodb
but yes, usually the database should do the work, except in the case of mongodb, the db is so dumb that it requires you to think for itself.
 
5:45 AM
cbg
 
cbg
how's the metaq going?
 
No idea, let me check.
Mixed bag (+5 / -9), but mostly negative opinion I think.
Just like the topic of questions I answer, people aren't interested in the type of cv work we do
The very first answer was good. But I felt it assumed a lot of things, in the exact opposite sense, so can't accept it.
 
also, you posted to metasex, perhaps so meta would have been better
 
ah yes, perhaps
But it's ok, I am happy without it, not that big a deal
 
@AkshayKandul are you still there?
 
5:53 AM
But sometimes some motivation does help, specially when most questions I end up answering are from the new queue list which are usually from new people. Low upvotes, low acceptations and a tonne of work.
 
but are they duplicates?
you need to get the dupe hammer :D
like in C, now that I have the dupe hammer, I look for duplicates more actively
 
sometimes yeah, I don't think I need the hammer yet.
And it's a long way to go (~700 more score)
 
and almost every question that has only one problem point has a duplicate.
the bad thing about C is that people write long programs with cargo cult programming, and they have at least a dozen bugs in the single program.
 
sometimes that's the case with Python too
But I'd rather try & help the Python ones than the C ones :D
 
with Python, usually people understand they need to run...
and usually with python: if it runs and looks correct, it might be mostly correct
C should require a license
3
 
6:02 AM
@AnttiHaapala yeah i am here.
 
@AkshayKandul I am just trying to see if I can convince you out of MongoDB here or if someone else decided that for you?
 
@AnttiHaapala actually that is not possible. As whole application is create around mongodb
created*
 
6:35 AM
bleh, neither of the two "return statement in loop" on SOPY have an accepted answer
 
-2
Q: What is wrong with this function in Python?

Lemodef get_all_indexes(char,string): result = () for i, c in enumerate(string): if c == char: result += (i,) return result Then when I run this function, for example, get_all_indexes('e','evening'),what I expected is (0,2), but the output is (0,) instead. An...

That should be closed due to typo / simple error IMO, currently it has 1 dupe and 2 what's wrong type cv
Hammered as dupe, hmm.
 
I wouldn't consider it a typo, and if we close stuff as "simple error" then most of SO needs to be closed :p
 
yeah I could see that. Dupe is better.
 
@Rawing upvoted is enough?
 
I disagree with the most of SO part
It's more like people do simple stupid things that result in unnecessarily complex errors
 
6:42 AM
Hmm? enough? what are we talking about?
Well, "simple" is relative anyway.
I wouldn't mind closing the entire regex section as a dupe of a regex tutorial, but I guess other people would.
 
lol
Then it's time to shut SO for Documentation then :D
 
@AnttiHaapala Not sure what you're talking about.
 
7:04 AM
cbg-ning
 
7:35 AM
cabbage
 
@Rawing dupe tgt
 
8:07 AM
cabbage
can someone tell me How to add logs in log file using logging.info('etc etc') in flask.
i am not able to do this
 
multistage migrations are a pain
 
@AnttiHaapala Ah. True, it doesn't really have to have an accepted answer. I still don't like either one of those two questions as canonicals though - one of them asks specifically about print vs return, and the other is far too lengthy. And the top-voted answer is kinda... why the yam is it adding up numbers?
 
@Rawing so ask one yourself, then edit it into the canon :D
self-qa
with > Note: QA is intended to be the canonical one for ... dsaasfoisap9252
 
ugh... Idunno... I'm not one to write wordy, noob-friendly answers
 
that's where the rep is
We've finally realized what the step 2 is: solve the problem once and for all - and solve it well.
(step 3 is profit)
 
8:30 AM
-8 question with "plz giv me codz" gets an answer - stackoverflow.com/questions/45792310/parsing-json-content
 
8:49 AM
@AshishNitinPatil gone
possibly not too late
@AshishNitinPatil also, where is your close vote!
I was the one to cast the deciding vote
 
@Rawing {1: "a"} is definitely not JSON data :P
 
That's why I put it in :D I wanna hear the OP say "ofc that's json data"
 
:D
eval :d
 
Right, missed your sarcasm. Will try and retune the detector...
 
"retune"
you might consider installing one.
 
8:52 AM
But the seller of the previous one promised it's good for a year more
 
Not so much sarcasm, it's more of a trap to show that the OP probably has no idea how unclear "json data" really is
They probably meant "stuff enclosed in curly braces"
 
@AnttiHaapala ah, too busy contemplating about flagging the one who answered. Missed the question lol
 
@AshishNitinPatil plz giv me brand new ferrari
wait ... it doesn't work. lol
 
9:08 AM
What exactly were you trying? I need to know so that perhaps I get lucky :P
 
@AshishNitinPatil just being cheeky ;p
 
ah, can't try that on self. I'd see it coming anyway :-p
 
 
1 hour later…
10:12 AM
cbg
@AnttiHaapala isn't a Finn without a sarcasm detector fundamentally flawed?
 
@AndrasDeak \o/
 
sup
 
not much, just working -_-
 
at least you won't be bothered by silly distractions such as eclipses
 
@AndrasDeak tbh, I do not mind a silly distraction, from time to time. otoh, I don't live in the US, so far so good
 
10:20 AM
yeah I know
 
@AndrasDeak not so silly for the sake of witnessing one :|
 
eclipses go all around, sooner or later there'll be one in your area
 
yeah, but you should be aware of it and have time and the required tools to view properly
 
hmm, not that soon
actually the one on 2034 has Saudi Arabia listed for totality, but UAE is not in the list
umm...2081 :P
it'll be a totality here too
too bad I'll be dead by then
I did see one in my early teens, so it's only fair
 
I don't think I'll spend the rest of my life in UAE :-p
 
10:25 AM
yeah, I figured
 
I'll try & find some, someday
I want to live in one of the nordic countries. My body might not be suited for it, but it might be what I want.
 
The eclipse will only appear on the tip of Brittany before the evening. It will be mostly invisible here
 
@AshishNitinPatil They are awesome. Reindeer for the win.
 
10:46 AM
cabbage
sql = 'INSERT INTO custom_user_test_data(taskid,test_data) VALUES (?,?),("final","new")'
    db.engine.execute(sql)
Can someone tell me what is wrong with the above code
It works perfectly in SQL browser and inserts data into tables
but when i run this through flask application It throws an error
sqlalchemy.exc.ProgrammingError: (sqlite3.ProgrammingError) Incorrect number of bindings supplied. The current statement uses 2, and there are 0 supplied. [SQL: 'INSERT INTO custom_user_test_data(taskid,test_data) VALUES (?,?),("final","new")']
 
did you google that error?
I had a hunch with literally no knowledge of sql nor sqlalchemy, and my hunch seems correct
 
I googled and they give a bunch of solutions which does not work at all
 
really.
 
Been stuck for hours on this
As a raw SQL it works but for some reason SQL alchemy does not like it
 
10:52 AM
@AndrasDeak Yeah , i tried that , does not work
 
really.
what did you try exactly?
 
added a coma, replaced tuple with list
all combinations
 
did you try the combination which is in that answer?
wherein you're passing actual arguments to execute() rather than a single string with comma-separated stuff inside?
 
Just a moment
 
hint: if Martijn has a +160 answer it's probably correct
 
10:59 AM
it worked!
 
Why doesnt it take the actual values?
 
@Anarach what doesn't take the actual values?
 
I mean , It works when I pass in variables as arguments instead of the actual data.
 
what do you mean "variables as arguments instead of the actual data"?
 
11:02 AM
@AndrasDeak Actually nevermind , It was my fault I was stupid
You were right about the Martin Guy though
 
*Martijn
 
LOL I thought that was a typo
 
If you just meant "why was my original not working and why does the right one work": they asked for 30 dollars from you, but instead of your wallet you only gave them a picture of your wallet.
 
Makes sense..
I feel I should go back to being a store salesman and stop coding
I keep making stupid mistakes like these
 
hehe :D Don't sweat it. But there are hints: assume that an answer with that much upvotes and no negative comments is probably right, and try to see what you're doing wrong
 
11:04 AM
Do you pros also felt so bad
Like I feel I am being a cheat
I rip off of stackoverflow
 
that's just impostor syndrome
both impostors and legit experts have it
 
I have not skill at all, I copy answers from SO all the time
I will get caught by my employer
SOON
 
"I have written 11 books, but each time I think, 'Uh oh, they're going to find out now. I've run a game on everybody, and they're going to find me out.'" — Maya Angelou" Lireally me
But I have not written 11 books or coded anything significant
 
most people probably don't
 
11:09 AM
I just feel bad, Thank you kind Sir for the advice.
I wish to be like people in this chatroom one day
 
no worries
 
11:55 AM
@Anarach exactly why I hangout here :D
 
12:06 PM
I wish to be like .... myself, which I am \o/
 
hah, good for you. I wish to be like my hopeful future self, better every day.
 
12:26 PM
What is the appropriate way of handling a question with multiple dupe parts? e.g.
1
Q: Pythonic way to create list of strings from file names in folder?

hernanavellaI have a folder in my computer with many .txt files: file_one.txt --> location = r'C:\Users\User\data\file_one.txt' file_two.txt --> location = r'C:\Users\User\data\file_two.txt' file_forty.txt --> location = r'C:\Users\User\data\file_forty.txt' How can I turn the name of the files (wit...

 
gold badgers can edit the dupe target list
add multiple questions
 
@AshishNitinPatil I would suggest adding another dupe target
 
And how exactly do I do that? When the question is already hammered?
 
lol, it's been reopened
 
not coldspeed...was it?
 
12:29 PM
Nope, Seifert
 
huh...
 
I saw him answer a blatant typo the other day
 
How can you tell who reopened it?
 
12:29 PM
He answered it himself now.
 
@Rawing timeline
 
His answer is good. But hammering intention is questionable. (My bad, other guy opened it)
 
Now can we close the question with 2 dupes? :-p
 
Thanks. /posts/id/timeline... gotta remember that.
 
12:32 PM
I have to say I'm feeling pretty burned out on hammering, because of quick unhammering going on in the tag
 
meta? :P
"Why are posts that would be left as dupes get reopened in the python tag?"
 
By the way:
@cᴏʟᴅsᴘᴇᴇᴅ: I know this happened a while ago, but reopening a question unilaterally should not be done hastily or quietly. Furthermore, why reopen an obvious duplicate, when you can add better (?) links to cover it completely? A couple of your past comments and actions got me thinking that your understanding of how this feature works and when it should be used is a bit flawed. Could you take time to read this and this, and not be so quick to vote to reopen? In general, please use your privileges more responsibly. — vaultah Aug 17 at 20:02
He hasn't responded yet
 
you could always ping him here :P
 
@AndrasDeak not a bad idea
 
The timeline doesn't show the dupe target? :/
 
12:35 PM
gold hammers fighting each other is the stupidest waste of resources ever
 
12:48 PM
Any Django users on?
 
> You may ask your question without a preamble.
 
I have a Django template loop that is stuck in an apparently infinite cycle, and I can't figure out why. I am trying to figure out ways to troubleshoot. pdb and print to console don't seem to be working from inside the loop.
 
Well, you could start with showing us the loop (If too many lines, use pastebin)
Ah, Copy Editor doesn't count tag edits.
 
@AshishNitinPatil For security reasons, I can't copy-paste code out of the environment that it is stored in.
 
1:01 PM
That's why I'm just looking for tips on how to troubleshoot this issue.
 
You can print the object (or it's details) over which you are iterating, before the iteration (remove / comment it during testing since you said it gets stuck with it)
 
@AshishNitinPatil I've already done that and the object prints fine.
 
Now start with each individual step inside the loop. Try removing (comment) it all at first, see if you get an output. Then slowly start re-adding stuff.
 
@called2voyage you can replace the variable names with any generic stuff like books/authors, we'll never know what you are working on
 
@DanielKislyuk I meant that I'm physically incapable of copy-pasting, not that I'm not allowed.
 
1:08 PM
I see. if pdb is not working inside the loop, are you sure you are getting into this loop at all?
 
@DanielKislyuk If I comment out the loop, it executes up until that point. I'm not sure why it wouldn't enter the loop.
 
@PM2Ring In reference to this comment, I don't see any Py3 documentation for itemgetter usage for dictionaries. I am checking this doc - docs.python.org/3/library/operator.html#operator.itemgetter
 
@AshishNitinPatil Yes, the docs are a bit obscure in that regard, although they do say "Return a callable object that fetches item from its operand using the operand’s __getitem__() method. " But it would be nice if they had an example that showed that you can use itemgetter on a dict.
 
1:23 PM
@PM2Ring Thanks, will see if I can add to the docs :)
 
Django docs question. Where do I find the description of all the functions and attributes that are printed when doing dir() on django objects? Some are intuitive,some are not and many of them are not anyhow listed on django docs website.
 
@AshishNitinPatil That would be great!
 
1:55 PM
@called2voyage wut
 
code leakage paranoia and whatnot
 
0
Q: DB constantly exploding in Django

user8467470I am trying to get going with django, which so far I have found to be amazing other than repeated db issues. My latest is following the Django by Example book and I have followed everything to the letter, yet when following some simple instructions to add some data via the python shell api I get...

^ That title XD
 
Hi, i've got a question about best practices. I'm processing some objects, and right now i've got a bunch of function for processing them individually and then functions using those to process lists of objects. I was wondering if it was a good idea to nest the functions so the code is less scattered ?
 
or put all those processers in a separate module and import that
 
2:10 PM
oh yeah nice one
though those are already part of their own module
so i might lose clarity in the end
 
there's probably not enough detail here to give meaningful answers
 
@AshishNitinPatil =)) does it not indeed?
 
lol no, at least not literally (thankfully) :)
 
DSM
Monday morning cabbage.
 
@SewdiO When you say "nest the functions" do you mean that you want to nest the function definitions of the core processing functions inside the definitions of the list processing functions? That doesn't sound like a good idea. That's not what function nesting is for. Each time you call the outer function, all the inner function objects get regenerated, creating fresh function objects, which wastes time unless you actually need new inner functions on each call.
 
2:17 PM
yep that's what i meant
 
DSM
@AndrasDeak: (replying to your last message to me) my home notebook is linux, but we use Windows a lot at work. I spend most of my day in a virtualbox.
 
aaah, tricky!
thanks for clarifying
 
@PM2Ring makes sense, i guess i'll leave with it
 
> spent most of my day in a virtualbox
Sounds scary
 
on that note, i saw recently a recursive function nested declared and called inside a regular function, would that be a bad idea then ?
 
2:20 PM
@SewdiO If those functions work together on the same data objects it may make sense to bundle them together into a class. Or if they don't need that tight integration with the data, you could just put them in a module. But unless it's a large amount of code, I wouldn't worry about it. Just use comments in your source code to group them together.
 
DSM
Among other problems with nesting functions, it makes them much harder to write tests for. And if you can't write tests, your functions are probably broken anyway, so it doesn't really matter if they're nested or not.
 
Any great / standout resources for testing in python?
 
@DSM you shouldn't test nested functions
 
Then how do you know they work?
 
You test the nesting one
whatever is inside is implementation detail
 
2:25 PM
@SewdiO It's not terrible, but it does waste time having to re-execute the inner function definition every time the outer one's called. OTOH, sometimes you do want that, eg if the inner function has default args that are set by the outer function. Another use case is when you want the inner function(s) to be able to access the locals of the outer function.
Eg, I often have nested helper functions in the __init__ of a GUI class. There's only going to be a single instance of the GUI, so its __init__ will only be called once anyway. And it's handy for the nested funcs to be able to mutate the widgets that the __init__ is setting up.
 
DSM
@khajvah: First, we're talking about testing the code in the functions, so whether or not you describe that as testing the inner one or testing the outer one isn't very interesting. Second, frankly, the "everything inside a function is implementation detail" perspective doesn't work very well in practice, as the specifics of the implementation are what give rise to likely bugs.
 
@PM2Ring alright, thanks for the advice !
 
@DSM What value has the test that tests the code? Sure, specifics of the implementation give rise to bugs. You can still write a test knowing about the implementation and exploit that by constructing the right input. In that sense, I don't understand how nested functions make it difficult.
 
DSM
@khajvah: er, code is what's tested. By other code. So it has lots of value. And if you agree we're allowed to write a test specifically knowing about the implementation, then it sounds like we're allowed to care about the implementation details, in which case we both agree. Nested functions make it difficult because you can see the code, worry about a problem, and then have to mock the parts of the code beforehand to get it to the right state.
For example, your nested function might close over a value which is the result of previous calculations. If the function weren't nested, it would be much easier to test.
 
2:39 PM
An inner function is like a black box rattling around inside another black box. Sure, you can test the outer function by passing it various args, but you have no way of directly passing args to the inner function. And that means to thoroughly test it you have to analyze how the outer args get transformed to the inner args. So you can end up creating an artificial test harness for the inner function, and hope that it'll behave the same way when it's running inside the outer function. ;)
 
@DSM What's the alternative? If we take an example of an object, should the nested function be exposed to the object's public interface?
 
DSM
I'm running out of ways to say that nesting gives rise to additional testing complexity, so you can either eat the complexity or not nest your functions, so I'll leave you to nest your code to your heart's delight.
How 'bout them Jays? (Oh, wait, @MooingRawr isn't around to commiserate.)
 
3:05 PM
I'm going to guess and say they are blue.
 
Congrats
 
:) ty mod :-p
 
3:19 PM
@AshishNitinPatil Almost, but that's easily fixed. ;)
 
3:44 PM
rbrb
 
@PM2Ring OP removed his acceptance of my answer :/ Thanks for the saving grace :)
According to his exact question, only mine was technically correct.
 
No worries. I've had a few answers un-accepted lately, it's very annoying. Especially when you've also assisted the OP with comments, and even fixed the crummy formatting in their question. :grumble:
 
Of course, some new OPs don't realise they can only accept one answer. The other week I got an accept, a few moments later it had shifted to another answer, then another one, then finally back to mine after someone posted a comment to the OP telling them to make up their mind & not mess with people's minds.
 
haha, that comment would have been hillarious
 
4:07 PM
why is my error handling so bad
Its only printing out the except, why is it skipping the try?
 
DSM
Fortunately I don't answer Python 2 questions any more so I'm off the hook! :-)
 
so if i program this in py3, you can help me?
 
1 sec
 
Btw, you want input instead of raw_input. That should solve a lot of things. But then, you are switching to py3 now, so you need to cast to int anyway.
 
4:12 PM
@faceless Hint: what is the type of the object returned by raw_input?
 
it is a int
 
@AshishNitinPatil Friends don't let friends use Python 2 input.
 
DSM
Hint: nope!
 
@faceless No, it's a string.
 
@PM2Ring So, you would rather cast it to an int rather than using the built-in?
Always?
 
4:13 PM
son of a
ill be darned
 
@faceless, swearing is not allowed.
 
lol @AshishNitinPatil why shouldnt i use raw_input? The book im going through says I should
at least in py2
and you use input for py3
 
You can use it, but then you should be aware that raw_input reads everything as a string. But in your case you are using the inputs as integers.
Also, if you are converting it to py3, then let's not discuss this any further. Py2 is kinda obsolete now.
You should always avoid it, unless you can't. Then you should try to avoid it.
 
ah okay
muy bien
Im using py2 for this book then switching it for these other MIT courses X)
 
makes sense, but you can always convert.
Also, there might be an updated version of the book
For py3, you should try to find if there is one, and use that.
 
4:18 PM
yeah there is, but my computer partitions my python path really strangely
it makes 2 different python paths
one coming from C: path and the other coming from User path
it takes me about an hour to delete every instance of the path because my computer puts it in random places
 
And? Why is that an issue? You can always trigger scripts specifically like python3 script.py, unless that throws an error, in which case, it might be an easy fix.
 
oh believe me, Ive tried triggering the scripts via .py, but it throws an error
ive posted the problem on here before and no one was able to figure it out
 
DSM
Let's stick to your much simpler problem for now..
 
@AshishNitinPatil Because Python 2 input() is syntactic sugar for eval(raw_input()), and I hope I don't need to explain to you that passing arbitrary user input to eval is evil. ;)
 
yes @dsm
 
4:22 PM
@PM2Ring Ooh, didn't know that. I've perjured myself, so many times. At least I'm glad I don't use it anymore.
 
so all in all, im going to finish this book in py 2 and then convert over to py 3 cause its so...meta
 
Jul 14 at 19:15, by PM 2Ring
Learning Python 2 now as a precursor to learning Python 3 makes about as much sense as learning Shakespearean English as a precursor to learning modern English.
 
I remember "starring" it :D
 
lol i feel that is a stretch, but im a noob
 
I don't think good formatting for a "i need code for my x job / task" question deserves upvotes - stackoverflow.com/questions/45797001/…
 
4:32 PM
Im removing py2 and replacing it with py3 just for you Ashish
 
@faceless Well, it is intended to be humorous, but it is making a serious point. The string handling in Python 2 is much more complicated & error-prone than it is in Python 3, particularly in regard to dealing with Unicode. So why waste time & energy learning it?
It's better to avoid it, learn the clean Python 3 way, and when you're confident with your Python skills you can go back & learn the old-fashioned way if you need to fix broken Python 2 code written by people who wrote the broken code because they didn't understand the arcane mysteries of Python 2 strings.
 
DSM
4:49 PM
I'm not even sure I really understood how I should do things until Python 3 came along, because I tend to only learn when things break. Python 2 let me get away with a lot of mistakes, so the failures seemed very mysterious. In retrospect I could tell former me in ten minutes what he needed to know, but that's not how things work.. #causality
 
@PM2Ring it's so funny, because when I first came to Python3 I remember having an awful time dealing with bytes vs. strings and getting things wrong half the time
 
Causal Monday recbg
 
now I almost never have a problem and most of my problems are solved by remembering BADTIE (bytes are decoded, text is encoded)
in retrospect it's pretty obvious that I was abusing the mess out of strings through pure ignorance
checking Arkansas eclipse progress rbrb
 
A few days, this question was posted on SO. It's a somewhat extreme case, but not atypical. There's a lot of Python 2 code out there that has shoddy Unicode handling that kinda seems to work, but which is actually riddled with errors.
I feel sorry for that guy with 10 "million" lines of code to fix. I guess we could say that the code should've been written properly in the first place, but I also understand how I got into that unpleasant situation.
@WayneWerner Sure, me too. And I still occasionally stuff it up from time to time. But at least in Python 3 you find out pretty quickly that you've done the wrong thing, because your code raises an error. Whereas in Python 2 you get stuff that runs, but which barfs when you pass it data that's not ASCII or Latin-1.
And that's why we say it's easier to go from Python 3 string handling to Python 2 than the other way around. Python 3 teaches you to think about bytes vs Unicode text strings, rather than mentally mashing everything together.
 
03:00 - 17:0017:00 - 00:00

« first day (2501 days earlier)      last day (2430 days later) »