News for hackers. Stuff that matters.
Re:Show HN: Little Ball of Fur – A Python library for graph ... by perfunctory on Monday May 18, 2020 @06:43PM (#23229243)

      def _check_networkx_graph(self, graph):
        try:
            if not isinstance(graph, nx.classes.graph.Graph):
                raise TypeError("This is not a NetworkX graph. Please see requirements.")
        except:
                exit("This is not a NetworkX graph. Please see requirements.")
First, I don't want any library to call exit on me. Second, what is it even trying to do? Raising an exception and immediately catching it? At best this is just a horrible style.
Re:Show HN: Little Ball of Fur – A Python library for graph ... by nerdponx on Monday May 18, 2020 @11:56PM (#23231150)
Yikes. Is this meant to be used in a command line application? Or are you actually meant to call a function in your code that could crash your application on bad input?