Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kgm
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
kgm
11y ago
The intention is to default-initialize values to things that are invalid. There's no obvious "invalid" value for a plain integer, so they get zero. But char gets 0xFF, because a char is defined to hold UTF-8 code units, and 0
32.
▲
“Let's talk about a hypothetical public-facing service”
(reddit.com)
439 points
by
kgm
11y ago
|
67 comments
33.
▲
by
kgm
12y ago
A while back I hacked up a script for doing digraphs in tmux. It's not precisely equivalent to screen's digraph support, but it does the job and (given that it's just a Python script) can be easily extended. http://
34.
▲
by
kgm
13y ago
The built-in profiler can be told to dump the results of the profile to a "pstats" file. A simple way to do this is to run your code under the module itself, as in: $ python -mcProfile -o foo.pstats foo.py This will run you
35.
▲
by
kgm
13y ago
Some of these quirks are explained incorrectly. I find the real explanations interesting, so please allow me to provide them. > 999+1 is not 1000 The examples given in this section do not actually show what the poster thinks! Python'