At this month’s PuPPy (Puget Sound Programming Python) Meetup,
I heard a brief mention of Python f-strings
as a new feature coming in Python 3.6.
In essence, they offer a simpler, more versatile method
of string formatting and interpolation
over existing methods.
F-strings can include not only symbol names
but Python expressions within strings.
With str.format, you can write
'Hello, {name}'.format(name=some_name).
You can control various aspects of how name is formatted,
such as being centered within a field—see PyFormat and Python String Format Cookbook
for examples—but no more complex expression is allowed between the braces.
Herewith some examples of f-string expressions
drawn from PEP 0498:
>>> date = datetime.date(1991, 10, 12)
>>> f'{date} was on a {date:%A}'
'1991-10-12 was
…continue.
For the CookBrite holiday party this evening,
we selected recipes from the CookBrite app
and cooked them for each other.
We had a lot of good food.
I particularly enjoyed making and drinking these milkshakes.
Ingredients
- 1 pint Chocolate Gelato
- 2 oz Bittersweet Chocolate
- 1½ cup Buttermilk
Instructions
- Remove the gelato from the freezer to soften.
- Melt the chocolate in the microwave or in a small saucepan over low heat.
- Let the chocolate cool.
- In a blender, combine the gelato and buttermilk until thick and creamy.
- With the motor running, slowly pour the melted chocolate into the gelato-buttermilk mixture.
- Divide the milkshakes among individual glasses and serve immediately.
Cooking time: 12 minutes
Adapted from Twenty-Dollar, Twenty-Minute Meals, Caroline Wright
It seems old-fashioned to do so,
but I still like to send and to receive Christmas cards.
We wrote 30 cards last weekend.
Almost all were Wondermark Multi-Purpose Greeting Cards,
from a Kickstarter that Emma contributed to a few months ago.
Speaking of Kickstarters,
No Holds Bard showed up in my Facebook feed today.
I was so tickled by the concept that I anted up $10.
I’ve read several novels where Will Shakespeare was a character,
such as Ink and Steel and Revenger,
but never a comic book where he was a superhero.
Yesterday, we started receiving cards from other people.
A couple of dozen more will follow.
Two weeks ago, we painted the kitchen blue.
A deeper blue than I had intended.
It had more than a little bit of the Greek taverna about it.
Today, we started work on the "bar room",
the room between the kitchen and the back yard,
where we keep the booze.
No painting yet.
We’ve taken everything out of that room and cleaned.
Fifteen years of cobwebs have been removed from behind the book cases.
Soon, a lighter blue.
Tom Hardy has had a very good year,
starring in Mad Max: Fury Road and
playing both Reggie and Ronnie Kray in
Legend.
Legend loving recreates London in the Swinging Sixties
when the Kray twins were not only notorious gangsters but also celebrities,
mingling with the rich and famous in their nightclubs.
Reggie is portrayed as the smarter, charming, and stable brother;
Ronnie as erratic and psychopathic;
both are capable of great violence.
The film is narrated from beyond the grave by Reggie’s wife, Frances,
and concentrates mostly on Reggie.
Hardy is excellent as Reggie, but hard to understand as Ronnie,
while Emily Browning does a fine job as the young wife who’s …continue.
We have three non-traditional Christmas movies
that we watch almost every December,
Die Hard,
Die Hard 2: Die Harder,
and The Ref.
Die Hards 1 and 2 are the best in the series.
Although they seemed wildly over the top when they were made (1988 and 1990),
they seem understated compared to the thrillers that Hollywood pumps out now.
We saw Die Hard again tonight.
Bruce Willis and Alan Rickman shine in their breakout roles.
Willis exhibits the trademark cockiness that was already familiar
from Moonlighting,
but he’s not as obnoxious as he often was in later roles.
Rickman gently nibbles the scenery as a terrorist turned master criminal.
Emma’s been complaining for some time that USB devices only worked in one port
on her Lenovo E545 laptop.
The USB 2 port worked;
the USB 3 ports didn’t.
I took a look at Device Manager,
and I noticed that most of the USB nodes looked wrong.
She went to the Lenovo website and downloaded two USB-related drivers,
the AMD USB Filter Driver and the AMD USB 3.0 Driver.
Between them, they fixed the problem and she now has all ports working.
This machine is running Windows 7.
At some point, she wiped the machine to get rid of Lenovo crapware,
and installed a clean copy of Windows 7.
She downloaded a pile of …continue.
Title: The Ax
Author: Donald E. Westlake
Rating: ★ ★ ★ ★ ½
Publisher: Grand Central Publishing
Copyright: 1997
Pages: 352
Keywords: crime, dark humor
Reading period: Nov 7, 2015
Burke Devore is a middle-aged middle manager at a paper mill,
who’s been laid off for some time.
There are too many others like him
and they’re beating him out for the few positions in his field.
In desperation, he decides to eliminate the competition
by placing a fake job advertisement for others with similar skills
and by killing them off.
Westlake is known for a variety of crime novels,
including the light-hearted, humorous Dortmunder books.
There’s humor here, but in a very dark vein, and social …continue.
At Freely Speaking Toastmasters tonight,
Kim gave a talk on the History of Toilet Paper.
It was inspired by the quote above from the Iron Druid Chronicles,
by a 2000-year-old druid.
She got much of her information from wikipedia.
I found the toilet paper FAQ while writing this post.
At FSTM, after the speech evaluator gives the speaker a formal evaluation,
we have five minutes of open evaluation from the audience.
My father has a hundred or so sayings that he trots out again and again and again—much to the annoyance of those who know him well.
When he moved from the Dublin to the London office of his bank in the
…continue.
I spent a couple of hours this evening making Christmas Puddings.
I soaked several pounds of dried fruit overnight
in hot water with a little whiskey.
The fruit plumped up considerably.
I let it drain throughout the day.
The photo shows the puddings in their bowls just before I sealed them
and put them into the oven for four hours of steaming.
They’ll get another four or five hours tomorrow.
When we’re ready to eat one, it’ll get another hour of steaming to heat it up.
We decant it from the bowl,
stick a sprig of holly in the top,
heat a tablespoon of whiskey until it catches fire,
and pour the flaming …continue.
Previous »
« Next