« first day (2135 days earlier)      last day (2716 days later) » 

11:00 PM
Unless they're something other than .format().
 
they're in 2.7 at least
 
>>> f"hai"
  File "<stdin>", line 1
    f"hai"
         ^
SyntaxError: invalid syntax
I have 3.5
 
f-strings are 3.6 only
 
@TuxCopter -1 hai shouild never be capitalized
 
@Downgoat sorry I fixed
 
11:02 PM
@TuxCopter Oh, those f-strings. I've never used them (yet).
 
question: is there way to 1) clear file contents 2) then open in append mode? in python
 
@Downgoat why would you want to do that?
 
If you're clearing then appending, isn't that just write mode? o_O
 
@Downgoat That's just the same as opening with 'w', isn't it?
 
^..^^^
 
11:03 PM
surely its the same thing as opening in write mode
 
@El'endiaStarman oh :|
 
wat
tfw
 
:O python has center built in
10/10 beautiful
 
what?
 
@TuxCopter str.center
 
11:08 PM
>>> "OMG :O:O:O".center(40)
'               OMG :O:O:O               '
OMG :O:O:O
 
didn't you already know about that?
 
wat
@TuxCopter ö
Ö
 
@BlueEyedBeast Nope
I've been using Python for 2 years and I never saw this
 
it also has "a".ljust(3, "w")
and rjust
 
Python copied Ruby confirmed
 
11:10 PM
have you tried 3..__str__()?
 
or the other way around idk
@BlueEyedBeast It does "3.0"
The double dot is not that obscure
 
@TuxCopter it's such a weird syntax
 
Not really
 
see (3.).__str__()
 
3..__str__() is basically Call(Dot(Number(1.0), Name(__str__)), []) in AST
Oct 5 at 4:54, by Downgoat
TIL it's Turing Complete, not Turning Complete ._.
 
11:12 PM
0 LOAD_CONST               0 (3.0)
3 LOAD_ATTR                0 (__str__)
6 CALL_FUNCTION            0 (0 positional, 0 keyword pair)
9 RETURN_VALUE
 
you really tought it was turning complete @Downgoat
 
@TuxCopter :(
 
wat really
A wheel is turning complete, but it don't make sense for a machine
 
Question: i have:
Commit = namedtuple('Commit', ['author', 'email', 'hash', 'change'])
 
@TuxCopter "Turing" doesn't make much sense either. It's a name, and "Turning" could have been his name.
 
11:16 PM
can I do: "{author}'s email is {email}".format(commitInstance) somehow
 
@Downgoat Nope
 
@Downgoat in python 3.6, yes
 
@BlueEyedBeast pls tell
 
use f-strings
 
                "{author} <{email}>:\n".format(author=logItem.author, email=logItem.email)
did i do right?
 
11:17 PM
yes
 
>>> x=dict(a=1,b=2)
>>> "{a}, {b}".format(**x)
'1, 2'
 
Hey does anyone want to play 3-player tic-tac-toe?
 
@Downgoat "{instance.author}'s email is {instance.email}".format(instance=commitInstance)
(or, if you're really lazy, 0.author and 0.email without the instance=)
 
-1
Q: Write an obfuscated program that terminates after 60 seconds

TheHansinatorWrite a program that terminates after exactly 60 seconds (or as close to it as possible). For example: #include <unistd.h> int main(int argc, char **argv){ sleep(60); return 0; } However, your goal is to write this program such that terminating after exactly 1 minute is essentially inh...

 
@NewMainPosts inb4 Java/Python integer cache magic
 
11:38 PM
Does anyone want to play 3-player tic-tac-toe or no? :(
 
11:49 PM
@Qwerp-Derp How does it work?
 
question: can i substitute re.compile("foo") with r"foo"
 
Nope
 
what is difference?
 
r"hello" is a raw string (escape sequences are ignored)
So r"a\b" is "a\\b"
 
r is raw, not regex.
 
11:50 PM
ohh
 
Ummm
@flawr So 3 players, and you have to make a row of 3 on a 4*4 grid
Not sure if it works tho
 
Ninja würde
 
Ich not speak german
 
Wow, my internet is slow today...
translate de: ninja'd
(from French) Ninja würde
 
@TuxCopter XD
 
11:56 PM
@Qwerp-Derp Somehow, I wouldn't be surprised if optimal play lead to either first player win or draw with that
 
lmao
 
HOLY SHIT!! CUTENESS ALERT!!
BABY GROOT
 

« first day (2135 days earlier)      last day (2716 days later) »