« first day (2467 days earlier)      last day (2706 days later) » 

17:00
Or even sexier: return {**json.loads(self.text), **json.loads(self.headers)}
FWIW, according to unicodedata.category there are 116766 codepoints that are letters; I have no idea if they're all valid in identifiers.
>>> from unicodedata import category; print(sum('L' in category(chr(i)) for i in range(0x110000)))
116766
DSM
DSM
This seems like a lot of overkill for what could be handled just by returning the desired object directly.
Finding all valid identifier characters without relying on unicodedata: github.com/pallets/jinja/blob/master/scripts/…
Take out the \w check, that's an optimization but makes the list incomplete.
@PM2Ring this is perfectly fine and expected considering that utcnow() doesnt fill timezone data
however would be better if it did
@PM2Ring You idiot, PM. It does that because basic datetime.datetime objects don't know timezones.
17:04
Also, there are some \w characters that weren't valid identifiers if I remember right.
they do, sometimes :p
@marxin Yeah, but you can't trust 'em. ;)
I dont trust anything
even if I assing a variable I still check its value
a = 2
assert a == 2
:D
from math import nan
z = nan
z == nan
Out[32]: False
@davidism only because of only-numbers or leading-numbers, I think
17:07
@PaulMcG assert z is nan
=)
Oh nevermind, in 3 it also includes unicode characters
17:19
I wish this OP would improve their question, or at least respond in some fashion to the comments. I've written some reasonably efficient code that I think does what they want, but I'm not going to post it unless they clarify the question and post a code attempt.
Ah, I should've refreshed that page. I see the question's now on hold.
Haha, rip. Maybe he'll figure his stuff out. one can dream
His question is very confusing: "Every grouped element can only appear once regardless of sequence." sounds like he wants combinations, not permutations.
I'm happy to vote to re-open it if he does the right thing. But I'm not holding my breath. ;)
Ping me if the stars align, I'll re-op as well.
Shall do.
17:28
@enderland I'm going to strip them from emoji to their measly ascii representation.
Ah, the old "describing a combinatorics problem in plain english such so that it's sufficiently ambiguous that there are half a dozen theoretically valid solutions but 11 of them will prompt the OP to say 'that's not what I meant'"
Indeed
FWIW, here's the core of my solution:
def combos(A, B, C):
    seen = set()
    for a, b in product(A, B):
        for c in C:
            t = {frozenset((a, c)), frozenset((b, c))}
            if not seen & t:
                seen.update(t)
                yield a, b, c
                break
"I have two numbers, let's say a=2 and b=2. I want to combine them and get a third number, let's say 4"
"Have you tried addition?"
"But then when `a` and `b` are 23 and 42, I'd get 65, but I want 966. Did you even read my question?"
Kevin, don't touch Kevin
all sorts of paradoxes might happen otherwise
hey, @Kevin
Should I be worried
17:33
yes
'-DEBUG' if (condition) else '' + '.exe'
I don't know what the context is, but yes, you should be worried
'' seems to be... a new line?
woah woah woah wait a minute. Why is there another Kevin here.
@Kevin it doesn't
17:33
Timeout.
room 6: validating your anxiety since whenever
this does not work anymore
The Kevins have aligned. :P
I was hoping to find an even more efficient solution, but when I count the number of outputs for various length lists I get [1, 4, 7, 16, 19, 28, 43, 64, 67, 76, 91, 112, 139, 172, 211, 256]. That sequence is on OEIS, but it doesn't list any nifty algorithms for it.
@Kevin why not try it and see?
17:34
yeah, its really unfortunate i've been getting pings for a week now
I'm curious what pieces of media created the trope that merely interacting with your past self is enough to cause the universe to explode.
Because I tried it, and saw lol
@Kevin that's a very bad use for parentheses in that expression
But that shouldn't be the case, interesting
wait a minute....is this past Kevin Kevin?
are all Kevin's just a form of the same Kevin?
17:34
('-DEBUG' if condition else '') + '.exe'
that's how I'd parenthesize that ^
>>> condition = False
>>> '-DEBUG' if (condition) else '' + '.exe'
'.exe'
but parens are unnecessary
Curious, no newlines on my machine.
set it to True
I get
-DEBUG
.exe
wwait
17:36
That's not the whole line, is it? it's part of something bigger?
oops
>>> condition = True
>>> '-DEBUG' if (condition) else '' + '.exe'
'-DEBUG'
yeah that too
condition = print(''),
which iteration of Kevin is Kevin M?
17:37
I don't know if the set of Kevins is orderable.
That's not along the time axis, but along a spatial dimension. Kevin Medium.
I've got an interview for a Python 2 shop later. Are there any major differences between 2 and 3 I should know about outside of the usual print, xrange, bytestring, etc?
You may as well try to sort complex numbers
I've never really used 2.
True and False can be assigned to
17:38
@MorganThrapp
>>> r = [i for i in range(10)]
>>> print(i)
9
>>>
unicode breaks everything
@MorganThrapp Lots of things that return iterators in Python 3 return lists in Python 2.
2 gives you cooties
Use raw_input instead of input during the whiteboard examination. I'm guessing it probably won't come up during your normal work duties though
@PM2Ring Oooo, did not realize that. Good to know, thanks.
17:38
i wouldn't even go to a place if i said "i am an expert at 3" and they said, "well you're disqualified since you don't know 2."
Yeah, forgot about raw_input.
division
ConfigParser (2) => configparser (3)
parentheses solved it.. doh
.....
17:39
always inherit from object
^^ big
@MorganThrapp No worries. The rule of thumb is: it's probably not an iterator, unless it's in itertools. Or it has a special name, like xrange
I'm assuming they won't disqualify me based on 2/3 differences, but I figure it's worth knowing.
I keep painfully learning why I should inherit from object, and then I forget a week later.
talk about how much you love LPTHW
tell them ZS is your power animal
17:40
@KevinMGranger Don't you have to use super() with an explicit superclass as well?
Easy solution: don't use inheritance.
yeah. In Python 3 you can just super().__init__()
Yeah, that's what I'm used to.
Yep. There's no argumentless version of super in Py2. And don't bother calling super in an old-style class: it will die. But hopefully you won't have to work on code that uses old-style classes.
that's super, innit
3
17:40
Is it super(MyParent, self)?
I didn't want to like that, Andras.....I really didn't. But I did.
(I'm pretty sure that's not original)
I thought it was super(MyClass, self)
@Kevin Oh, yup, looks like it.
It might be useful to remember which dunder methods changed, notably bool/nonzero. But that should be trivia really
17:42
no extended tuple unpacking
@KevinMGranger I did not know they changed.
>>> *a,b = [1,2]
  File "<stdin>", line 1
    *a,b = [1,2]
    ^
SyntaxError: invalid syntax
Good old __nonzero__
py 2 -----------------------------^
Well, like others said, most of this stuff shouldn't be a serious issue even if you don't know it
17:44
It's a devops-ish role, so I'm assuming it won't be a super deep dive into the corner cases of Python.
>>> d = 7/9
>>> type(d)
<class 'float'>
>>>
On the upside, Python 2.6+ lets you do b'some_chars'; it produces exactly the same object as 'some_chars'. It also has bytes(), but it just creates a Python 2 string.
@idjaw Sweet, thanks!
oh talk about pathlib!!
even though it was backported to its own standalone you can use in py2
pathlib is awesome
17:46
I expect the biggest day-to-day difference would be third party libraries that don't have perfect version intercompatibility
They actually asked me if I had any experience porting large projects to 3 from 2.
Find out when they plan to migrate the codebase to Python 3. If they haven't got a plan for that, be very afraid.
So I think they have some plans, but nothing firm.
yes
the best way to port code from py2 to py3.....you better hope it's unit tested
if not....buy a lot of alcohol
like..a lot!
Oooo, I should ask them what their testing strategy is.
17:47
And what they use for version control
and for CI
Zulip says mypy helped them transition from 2 to 3: blog.zulip.org/2016/10/13/static-types-in-python-oh-mypy
oh man I read that backwards
if your job is to port from 2 to 3 and you get freedom to really build an awesome system around it
Ask their opinion on NodeJS.
17:48
it could be one of the best learning lessons
Make sure you're not allergic to the company dog, and inspect that the foosball table is made from cruelty free materials
@MorganThrapp Your Yoda word order tripped me. Don't toy with my feelings! :D
@AndrasDeak Don't worry, I did too, for the first few milliseconds. :)
I don't think they use CI. It's a trading firm and they use Python to monitor the trading environments.
oooh
17:48
Same, phew
@AndrasDeak I wanted to see how many heart attacks I could give the room. ;)
I think there might be someone here who might be in something similar, since it seems like it is "numberFirmy".
Maybe they might have some insight on that world
Sounds challenging. After all, writing Software for a Firm is Hard.
I see what you did there.
17:51
Node.js is the hammer used for any screw these days.
I interned at an options trading place, many moons ago. I only added value to the company by getting lunch for the more important employees.
For those who didn't see it in the transcript:
7 hours ago, by Vini.g.fer
Having a hard time with tox for testing. Can anybody help me out on this https://stackoverflow.com/q/44929158/1718174 ?
The question's 2 weeks old.
Looks like I can get a fidget spinner with my company name on it. Great.
but why?
Hand them out as swag -> kids will be customers for life
18:02
> The Brand team appreciates all of the ideas that $EMPLOYER-ers suggest for new promotional items through the swag $INTRANET page. Since we are unable to add every product suggestion to the Cool Stuff Store, we are offering an alternative site for purchasing some of these items: The Swag Lab
@MooingRawr so you can have one at your desk without feeling guilty, duh! :)
I'm disappointed in their website already: swaglabpromo.com/home.html
It's not that lol, it's internal
Currently patiently waiting for fidget spinners to stop being a meme so I can go actually buy one without feeling invisibly judged
I am visibly judging you
DSM
DSM
18:04
@MorganThrapp: I've ported some packages from 2 to 3. You want strong test coverage, even happy path helps a lot. If you have a poorly tested code, you can still do output stability testing -- write a test which just dumps as much output of as many functions as possible into a bucket, and then compare buckets across versions. The future package comes in quite handy, because it means you can make the migration gradual (or as gradual as can be). Expect annoyances with library dependencies.
Before anyone tries the "try not to care what the Faceless Other thinks about you" pep talk on me, I already gave it to myself and here we are
DSM
DSM
In many cases resistance to the crowd is admirable. Sometimes the crowd is right, though.
@DSM Thanks! Yeah, future seems like a great way to at least lessen the pain of moving.
Fidget spinners are just the beanie babies of this generation. Nothing wrong with enjoying them as long as you don't go crazy.
Never once did I truly require the full storage space that cargo shorts afforded me. Regular shorts would have been fine.
18:06
I carry around a bag of twisting balloons for making impromptu balloon animals, that takes a while cargo pocket.
The flippant response is "you must be fun at parties" but parties are exactly the correct place for impromptu balloon animals
but you have those pockets IF you ever did need them
DSM
DSM
Oh, wait, is that what the "cargo" in "cargo shorts" means? I'm not sure I've ever thought about it.
No, they were sold solely to promote development of the package manager for rust
There's a certain sublimity to using the term "cargo shorts" without understanding what it means
18:09
The reverse is worse -> women's pants generally have little to no pockets.
DSM
DSM
This is going to sound really stupid, but in my head it's what people moving crates in warehouses on islands wear.
but why islands?
I associate them with the rainforest, myself.
DSM
DSM
@sidnical: in Antarctica it'd be too cold to wear shorts.
I associate them with software devs, because like 80% of our shop wears them daily.
18:10
ah
DSM
DSM
We're a khaki shop, mostly because that's as casual as we can get away with and still not seem too out of place when we need to meet with suits.
enderland is wearing cargo shorts today
though to be fair. they came from Cabelas?
with long socks and sandals ?
no comment :V
.....velcro sandals ?
18:13
I wish my company would let me wear cargo shorts to work :( I feel so gadget-ty with em...
Just wear cargo pants
@sidnical Because they're cargo-cultists, and those guys always live on islands.
@TemporalWolf I don't own em, an I like shorts better ;(
or get the zipper ones that convert...
cargo-cultists from cargo island who load cargo ships from a warehouse wearing cargo shorts
18:15
I should not have diverted into fashion chat, as this detracts from my preferred mental image of everyone as brains in jars
I prefer mason jars myself, they offer a bit of extra space around the middle so I don't bonk my nose.
It's jarring to your mental image?
If brains in jars wore cargo shorts, would the leg tunnels dangle uselessly below the jar, or would you fit one jar in each of the leg tunnels?
this conversation officially went off the rails
This is what happens to your code when you convert from Py2 to Py3. How you get back on track is an exercise left for the reader.
18:18
@TemporalWolf there's no going back
You have to cut off the sickness at the source. Kevin has been kicked from rooms/6/Python.
Just add the new "feature" to the changelog => problem solved.
can you not subclass mock.magicmock?
what are you trying to do
make a custom mock response object for requests (this feels like it's way too complicated for something so conceptually straightforward)
18:28
Why not just use something like requests-mock? pypi.python.org/pypi/requests-mock
it does all the dirtiness for you
I need to verify that I am using the same session for all tests, but requests-mock doesn't seem to let me do that since it mocks requests under the covers
what framework are you using?
I'm just going to write this up as a SO question. tis too complicated to try to chat explain
there should be a test client int he framework that should still allow you to test this stuff
django and flask offer their own.
18:46
is it possible to search all questions i've posted for a string?
@idjaw I just posted it as a writeup
@sidnical There is definitely syntax to limit your search to posts written by you
string goes here user:me is:question should do it oops beaten
earned at least 200 reputation on 82 days
18:50
I was trying sidnical+string. thanks
@sidnical I normally just use Google, eg site:https://stackoverflow.com python "PM 2Ring" some_string
^ SE search is terribad
sigh tuple unpacking getting multiple answers in like 20 seconds :( stackoverflow.com/q/45174811/1048539
chat is SE's neglected child
DSM
DSM
"If brains in jars wore cargo shorts" <- Strange place, rooms/6.. o.O
If I had a free half hour I would create an illustration in the vein of "if dogs wore pants..."
18:58
@MorganThrapp tell them to hire me :P
@enderland Hammered. And thanks for finding a suitable dupe target, but I would've done it faster if you'd used the [tag:cv-pls] dupe ... protocol.
Today I am annoyed by the fact that when I grep for GetWidget to find all the places where that function is referenced, I get a lot of irrelevant results for the completely unrelated function GetWidgetDetails
DSM
DSM
Improve your regex! Or just do what I do, and pipe the results through grep -v. ;-)
@Kevin now how would you describe a dog wearing pants? Through the 4 legs and a belt going horizontally or would you have it on the back legs belt going vertically.
do I do this?
do we do this?
19:02
Visual Studio has a "find all references" button, but I also want to find the places where GetWidget is called as a web method from a js file, which can't be as easily introspected as C# can
DSM
DSM
@idjaw: outlook not so good
for me or for us? this is critical
You should get a run of SO branded ones
@MooingRawr I'm inclined towards the right image.
19:04
I think the belt should go tightly around the neck.
Sorry I'm late, but cargo shorts are the best
neckbelts... I'm pretty sure that's an old SNL gag
it was on The Onion years ago
1. IDs, 2. phone, 3. tissue paper, 4. dog poop bags, 5. doggie snacks all go in separate pockets
Yeah that's probably it
19:05
I would agree with you Kevin...
oh wait....this is the official one: antsylabs.com/products/fidget-cube
oh my...
someone in my chats has one of those
my friend has one
I want it....I love to fidget
my wife hates it when I fidget
WHAT DO I DO!
DSM
DSM
Listen to your wife.
listen to DSM who tells me to listen to my wife...
listen to my wife...
listen. to. wife.
I think i can do this
It's cheap and fun to get into the fidget spinner hobby: ebay.com/sch/…
DSM
DSM
Everyone who buys a fidget spinner should donate an equivalent amount of money to charity, both because it's a better use of the money and as a type of penance.
So we run PhantomJS it do webtests, but their implementation is leaky. So I've added a process kill clean-up step... Every time a testsuite completes it kills 318 orphaned phantomJS processes... -.-
Charities would be happy too, given the prices in that link.
You should only be able to buy a fidget device if you can get three witnesses to confirm that you've idly disassembled at least 300 ballpoint pens over the course of your life
DSM
DSM
19:09
It's nice to see that you can buy an authentic Steel Flame Brass Compass Rose Ring Spin Slug Set Fidget Spinner. I'd hate to spend 900$ on an inauthentic one.
There are companies that make small batches each month that sell out within a minute of being posted. People are irrational about these things. Hence the $900 eBay listings.
Fidget spinners: now available by prescription and no other way, punishable by federal prosecution
I don't understand the appeal for most of the random social norms that spawns and fades away...
Bug report from QA: "The Widget viewer crashes when you view more than ten items in 'show only widgets from last 30 days' mode". Meanwhile my test database contains only widgets made in 2013. This is a problem.
DSM
DSM
Last summer it was Pokemon Go; this year it's some kind of handheld distraction tool. If I knew what it'd be next year I'd be a quadrillionaire. On balance I guess it's harmless.
19:20
Which module do I find utime in? https://docs.micropython.org/en/latest/pyboard/library/utime.html
"import utime" dosn't work and the functions aren't found in the time module..
Sanity check: you are in fact using micropython, right? And not some other distribution?
Like, I wouldn't expect CPython to have a utime module, for instance
@JohanSundman Or do you want os.utime?
I'm expecting one of two responses: "of course I'm using micropython, why would I be looking at its documentation if I wasn't?", or "micropython? CPython? Idk, what's the difference? I just stumbled upon this documentation from googling and I want to know why it doesn't work on my machine"
I want to use micropython, which module do I import?
I'm guessing you need micropython.org/download
19:29
Is there a pip install?
I haven't looked thoroughly into it, but I'm guessing micropython is not a module, it is its own variant of Python. You can't pip install variants of Python.
ooh.. This makes sense now
Do you want to have micropython because you bought a pyboard and want to run software on it? Or do you want to have micropython because you stumbled upon its documentation from google and thought some of its functions looked useful? In the case of the latter, I think there are probably easier ways to get that functionality
Ugh, it's always about utime. Never about metime.
Hi, I don't understand how to call MainLoop of wxPython in a non-blocking manner here. Could you please help me?
Using threading or multiprocessing is causing a lot of runtime errors related to low level libraries like xlib.
19:39
I don't know anything about wxPython but I do know about Tkinter, which also has a mainloop method that blocks perpetually until the main window closes. When people ask "how do I execute code after calling mainloop?", the correct answer is usually "register functions as callbacks so they will execute in response to countdowns or user action"
@Kevin could you provide a minimalistic example in Tkinter?
I like to think reporting non-compliant spam to the FTC will help make it go away. Thankfully most remailers are pretty good about ganking accounts for violating their AUPs.
99% of the time, they don't really want a nonblocking mainloop. Because the code they want to execute is usually something like "get the data from the text box and do some calculations on it". But if mainloop was nonblocking, then the "get the data" code would execute a millionth of a second after the window appeared, so of course the user would not have time to enter any data into the text box. What they really want to be doing is running "get the data" in response to the submit button.
Hence the name "event-driven programming"
Or, slightly more advanced: running "get the data" in response to every key stroke in the text box, provided the calculations are fast and not catastrophically temperamental if you run it 100 times, 99 of those times with incomplete data
19:43
@Kevin the code I provided creates a System Tray Icon so it must be a non-blocking method. I'm sure about that.
I'm not sure I understand your reasoning. Why must it be non-blocking?
19:55
This function creates a system tray icon. I need to call that function from main program in a non-blocking manner because main program needs to continue.
Then you call it in a thread or subprocess.
is there a special name for unordered decorators?
I'm having a hard time formulating what I'm trying to read up on....
ultimately I'm trying to see if I can mess around with decorators and not care about what order they are set in
unless I am breaking some idiomatic design of decorators and I should stop and not do this
What davidism said. You still need a app.MainLoop() so that app can do its stuff, but launch app in a thread, or as a background subprocess.
@idjaw idempotent? Anything that returns the original function and doesn't do bad things on repeated use is safe to reorder.
yes! Thank you! That's the perfect word to explain it. It wouldn't come to me.
<3
20:02
Coincidentally, a week or so ago, as an exercise in learning how to use threads, I wrote a Tkinter program that runs in a thread so I can use it from non-event-driven code. But after I finished it I realised I could get rid of the threading stuff and retain almost the same functionality with a simpler program.
Hmm... someone just edited a question and changed "brackets" to "braces", which are not technically the same thing. Not sure it's worth editing/rolling back though.
@mertyildiran Wherefore art thou using Python 2?
@davidism I was calling like Thread(target=app.MainLoop).start() and it was giving me lots of errors but it turns out Thread(target=SystemTrayInit).start() is the correct way. (in a wrapped manner) OK that solved the problem to a certain point, thank you so much.
@PM2Ring yes I'm using Python 2.7
DSM
DSM
Are you being held captive and that's all your kidnappers will let you use?
stockholm syndrome is real
20:07
FWIW, here it is, just in case other PIL users have a use for it: A Tkinter viewer for named PIL Images I wrote it because I'm not a huge fan of Images.show(), which relies on an external viewer (generally ImageMagick's display on Linux).
@davidism we will support both 2 and 3 in the future on that project. We need to support old releases of distros so using Python 2.7 while developing gives a more retroactive perspective.
Fair enough
Still, I find it easier to develop in Python 3, with modifications where necessary to ensure correct behaviour on Python 2; YMMV.
DSM
DSM
I guess whether I'd still support Python 2 depended on my target audience. If I were distributing a library people were going to integrate into their own codebases and lots of my users were still 2, maybe -- maybe -- I'd let practicality beat purity. But if I'm distributing an application, I wouldn't support 2, because it's straightforward to get a Python 3 running on their system.
Yeah, how old does the distro have to be before it doesn't even provide Python 3.3?
I just ventured in to aspect oriented programming based on what I am trying to learn. This stuff is wacky
20:17
recbg
cbg \o Andras
how goes it?
it goes, panda cookies keeping things rolling.
sounds good
@davidism recently someone reported an issue (for our project) from Ubuntu 12.04 because his Python interpreter version was below Python 2.7.9. I dunno, I just feel more comfortable to target mainly the default Python interpreter version of the target system. Also most of the examples in the internet is still in Python 2.7. So that's making it easy to integrate.
20:23
the default target system should never be the target though
ever
Our shop is 2.7 and we aren't migrating the 100k loc to Py3 anytime soon.
100k loc? what does loc stand for ?
Lines of Code
@idjaw I'm sorry, I don't quite understand?
DSM
DSM
I think delaying is a poor decision, because it increases the friction when you do jump, because you'll start hitting version incompatibilities.. but more work for programmers, I guess.
20:25
More jobs, even though it's not a fun job.... :\
@mertyildiran correcting myself......I jumped in too quickly. Target system is fine...I had a brain fart about virtualenvs. My bad.
But, also we move fairly quickly here by using newer distros, so we end up being ready for newer versions sooner.
@idjaw oh that's cool, my brain also gave fatal errors several times today :)
It is possible to write code that spans 2.6-3.5 if you eschew newer features and do some list/iterator and xrange->range wrapping, and get rid of or reformat your print statements. You can even add new API features that are 3.5+ friendly as long as you avoid a few syntax forms (like "nonlocal") that are toxic to 2.x. Then once 2.x is solidly in your rearview, you can just upgrade Python and start refitting to use the new hotness.
@DSM using something like tox I don't think it's really a ton more work either to start with 2/3 compatibility as part of a CI
This is what I'm doing with pyparsing (including unit tests), and then the next major release will be 3.x-only.
20:32
if you have decent test coverage you can find a lot of issues across versions (even with 2.7.9 >.>)
The more deeply rooted in enterprise shenanigans you are, the more you will find stuff in a tox file like:
py27,py34,py35,pywhyareyouhere
3
You will have to defer some nice features like f-strings, and probably "yield from", and certainly anything that starts with "async"
But there are some tricks too - change all bare "print" statements to "print('')", for instance (or just get rid of prints altogether and use logging)
DSM
DSM
The first project we gave our summer intern was "write a code to translate .format-style interpolation to use f-strings". Was fun.
@idjaw yeah you right but there are also many novice home users, that still unable to upgrade their systems. Anyway I was aware that we need to both support 2 and 3 way before this conversation, look. So I agree with you guys in general :)
@DSM their words? :P
DSM
DSM
20:35
@AndrasDeak: I learned a lot about lib2to3, so fun for me, anyhow. ;-)
"Make sure you did not brake the Python2.7 support"
My Py2.7 support has no brakes.
A Freudian slip is when you say one thing, and mean your mother
(not original)
@TemporalWolf technically it was braked when end of life got pushed back?
@idjaw for the paycheck :D
dollar dollar bill yall
20:44
I have enroll for my benefits and I have no idea what I'm doing
add me as a dependant
Add me as a life insurance beneficiary
@PaulMcG from __future__ import print_function works in 2.6 (but not 2.5); I think from __future__ import division` works in 2.4, maybe even 2.3.
I would do my best to draw the line at 2.6 and no earlier.
I didn't avail myself of __future__, what happens if I do that import in a Py3.x environment?
the future is now. :o
20:50
However, in 2.6, The format method requires the fields to be numbered (or named), so you can't do '{} {}'.format(a, b) you have to do '{0} {1}'.format(a, b).
nm, I just tried it for myself, it looks to be a no-op
@PaulMcG It's totally benign.
I'll add that to my list for the next round of code cleanup
FWIW, it's official policy that nothing will ever be removed from __future__, so you'll never get name errors in the far distant future from having an ancient __future__ import in your code.
Although for me, that only affects example and unit test code, the lib itself has no print statements
Goner
And gone. Thanks, Paul.
I can't believe how much time I'm spending on this stupid test
what test?
trying to verify which requests session gets hit in my test
20:58
it's a coming-of-age thing for enderland
AM I REALLY AN ADULT
he has to prove his worth in an uncaring world full of sorrow
at last I'm always happy?

« first day (2467 days earlier)      last day (2706 days later) »