|
Raymond Hettinger
@
raymondh
Santa Clara, CA
|
|
Python core developer.
Freelance programmer/consultant/trainer.
Husband to Rachel.
Father to Matthew.
|
|
|
3,205
Tweets
|
383
Following
|
52,595
Followers
|
| Tweets |
|
Raymond Hettinger
@raymondh
|
3h |
|
|
||
|
Raymond Hettinger
@raymondh
|
3h |
|
Thank you. It was a wonderful conference.
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
4h |
|
FWIW, I mispronouced this and was aiming for something akin to "centaprogramming" with "cent" meaning a hundred or so participants.
That said, "antenna" seems to be a better fit :-)
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
4h |
|
One other thought: Twitter has a tight limit on the length of a tweet. Posted code examples have little space for comments, so it isn't reasonable to critique a snippet like it was production code.
I frequently get PEP 8 snipes at tweeted code fragments. That misses the point.
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
4h |
|
FYI, we've had default arguments since Python in typing.NamedTuple:
class Account(NamedTuple):
owner_name: str
account_num: int
balance: float = 0.0
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
4h |
|
Also note that as of Python 3.7, we have a cleaner, documented way to have named tuple default arguments:
Account = namedtuple('Account', ['owner_name', 'acct_num', 'balance'], defaults=[0.0])
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
4h |
|
@hohoroboto I think you missed the point. GPS was noting the code needed a comment, not that it was wrong.
FWIW, all default arguments in Python, not just namedtuple, are shared across instances. It is a user responsibility to not choose a mutable default argument.
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
5h |
|
When her talk video comes out, it will definitely be worth seeing. The various forms of the term are defined in a way that makes clear sense to those with a data science or statistical bent. Issues with non-representative data samples are not a new or unknown problem.
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
8h |
|
|
||
|
Raymond Hettinger
@raymondh
|
8h |
|
Listening to @math_rachel at #py_bay providing deep insights into unconscious bias in a machine learning.
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
Aug 17 |
|
Her case study is debugging memory usage on a running Python process. Pretty cool.
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
Aug 17 |
|
I just saw her stop a running Python program, inspect it, capture its GIL, insert new code, return the GIL, and let it continue running.
And she did all with "You don't even need to know C to do it".
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
Aug 17 |
|
|
||
|
Raymond Hettinger
@raymondh
|
Aug 17 |
|
Also: "Sharing mutable state is the root all evil"
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
Aug 17 |
|
Listening to new zen from @moshezadka at #Py_Bay:
"Boring is better than interesting"
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
Aug 15 |
|
I'm curious. Did your Python skills and credentials help in landing the new position?
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
Aug 15 |
|
#Python student question of the day: "How do I get the subprocess module to type in my sudo password when running commands?"
What answer would you give?
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
Aug 15 |
|
Congratulations! I'm happy for you.
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
Aug 11 |
|
>>> isinstance(x, types.GeneratorType)
True
|
||
|
|
||
|
Raymond Hettinger
@raymondh
|
Aug 11 |
|
Who says #python programmers don't have a sense of humor?
>>> from importlib.metadata import entry_points
>>> entry_points()['setuptools.installation'][0].name
'eggsecutable'
|
||
|
|
||