Hello, I'm looking for a solution to a problem which is described best as an
observer pattern issue I guess.
The scenario is the following, client code can register a callback for one or a
list of notifications.
This is currently solved by having a dictionary with the possible notifications
as
On 28/09/2019 15:59, Dennis Lee Bieber wrote:
On Fri, 27 Sep 2019 19:46:58 +0100, RobH declaimed the
following:
Thanks for all that information, but first of all using just import
adafruit blinka did not work as it returned bas: import: command not found.
Were you in the Python3 in
On Sat, 28 Sep 2019 at 10:53, Peter Otten <__pete...@web.de> wrote:
>
> Hongyi Zhao wrote:
>
> > Hi,
> >
> > I have some code comes from python 2 like the following:
> >
> > str('a', encoding='utf-8')
>
> This fails in Python 2
>
> >>> str("a", encoding="utf-8")
> Traceback (most recent call last):
Hongyi Zhao wrote:
> Hi,
>
> I have some code comes from python 2 like the following:
>
> str('a', encoding='utf-8')
This fails in Python 2
>>> str("a", encoding="utf-8")
Traceback (most recent call last):
File "", line 1, in
TypeError: str() takes at most 1 argument (2 given)
...unless yo
Hi,
I have some code comes from python 2 like the following:
str('a', encoding='utf-8')
But for python 3, this will fail as follows:
>>> str('a', encoding='utf-8')
Traceback (most recent call last):
File "", line 1, in
TypeError: decoding str is not supported
How to fix it?
--
https://m