From 89bbbf3626a783cc15484cedbb4c5a663d95e824 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Fri, 24 Jul 2020 08:13:12 -0400 Subject: Added a paragraph to the documentation about the fact that bs4 Tag implements __hash__ and bs3 Tag doesn't. --- doc/source/index.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/source') diff --git a/doc/source/index.rst b/doc/source/index.rst index 1159195..f655327 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -3495,6 +3495,11 @@ B.string. (Previously, it was None.) their values, not strings. This may affect the way you search by CSS class. +``Tag`` objects now implement the ``__hash__`` method, such that two +``Tag`` objects are considered equal if they generate the same +markup. This may change your script's behavior if you put ``Tag`` +objects into a dictionary or set. + If you pass one of the ``find*`` methods both :ref:`string ` `and` a tag-specific argument like :ref:`name `, Beautiful Soup will search for tags that match your tag-specific criteria and whose -- cgit v1.2.3