Notable Change 0 ▲ ronjeffries.com 163 days ago · Tech · hide · Fediverse post Hello, loves! I’ve made a notable change to PubSub, with more to come. Keyword arguments. Small apology for poor testing. I’ve noticed that when setting up callbacks with PubSub, I often get the parameters wrong. A note on a card here says “Checking for PubSub parameters”, and I decided to take a cut at that. After a bit of exploring and printing, I began, in several steps, to change over to keyword arguments. As things stand now, here is how one publishes an event: def interact_with_player(self, dungeon) -> bool: self.state = (self.state+1)%len(self.resources) dungeon.publish('state_number', self.name, content=self, state=self.state) return self.enterable You now provide the parameters beyond the event and caller_id with keywords. (Possibly we should require the other two as well: I’ve not decided yet.) My tentative plan is that when one defines a new PubSub message, the done thing will be to add an entry to a structure in the PubSub object that includes the event name and the… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town