Skip to content
/ borg Public

An exploration of Python metaclasses using the Borg pattern

Notifications You must be signed in to change notification settings

kamni/borg

Repository files navigation

Borg

This is an exploration of Python class construction using the Borg pattern (and stretching the Borg analogy in ways it wasn't meant to be stretched).

Each exploration contains a short demo that can be run as the module's '_main_'. This project contains the following sets of code:

Highlander

This is the typical Borg implementation where there really can only be one item, and every instance of the item just points back to the original instance.

Ignore the fact that in the demo the Borg seem more like Highlanders.

Borg Factions

The Borg have had a schism, and they now only share the same hive mind if they have the same faction.

Borg Workers

The Borg have decided that they want to save on wifi costs back to the mothership, so they want the ability to create specialized workers in the field that will sync back with each other, and not dump their all their data back to the hive mind.

Borg Children

The Borg have decided to have progeny, but unlike most parents, they want their children to have minds of their own (while still sharing a collective mind with others in their birth group, of course).

Threaded Borg

The Borg are a huge collective, and they might have millions of updates to their state at any given moment. Let's make sure they keep an accurate count of how many people they've assimilated.

Unstoppable Borg

The Borg have technologically advanced and have access to the fabric of spacetime. Now they can assimilate everything in the known universe, even if they exist in other time periods.

About

An exploration of Python metaclasses using the Borg pattern

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages