Visiting Dublin in November isn’t perhaps the best time. And indeed, one of the days there was a bit of a wash-out. It’s still a beautiful small city though. Here are the pictures :
Great weather, great food and great architecture : there is a lot to enjoy in Andalucia. Recently I went on a leisurely trip through Seville, Cordoba and Granada.
The Banksy exhibition in Bristol was an opportunity to visit Bath and Bristol.
I run unit tests in Python using the standard unittest module. The output should be logged to a file. For this Python has a standard logging library, which is somewhat similar to the logging library for Java. The problem is that there is no easy way to direct the logging to a new file for every test case. Here’s how I got around it. Firstly the setup method of my testcase object contains the following : def setUp(self): self.
When you have a dictionary in Python like this : mydict={'first':1, 'second':2, 'third':3} and you want to get the values into a list with a certain order you can do this : mylist=[mydict['first'], mydict['second'], mydict['third']] However, that can get a bit verbose if there are a lot of entries. For every entry you have to repeat ‘mydict’. An elegant way of solving this is using the map function : mylist=map(mydict.get,['first', 'second', 'third'])
Copyright (c) 2024 Michel Hollands