<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Stephanie:</p>
<p>Welcome. The "Python idea" here is to allow a broader range of
types as keys to a dictionary. The gap appears to be that certain
types (like set) "don't work" as keys (or rather their identities
not values work), but this is a misunderstanding. A set is
mutable: it is as if, in an ordinary dictionary (lexically
sorted), one were to allow changes to the spelling of a word while
keping the definition. It's not unreasonable to do, but the entry
is now potentially in the wrong place and ought to be re-inserted
so someone can find it.<br>
</p>
<p>Others have rightly suggested python-list as a place you could
explore how to construct the data structure you need, using
existing features of Python. However, I'll just mention that
frozenset is worth a look. </p>
<pre class="moz-signature" cols="72">Jeff Allen
</pre>
<div class="moz-cite-prefix">On 17/03/2019 16:35, Savant Of
Illusions wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAOKD-HBhuGtKTYhE1apXG=H83VvBpke=Y5YYMMqH_Ucehf5yRQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">I am in desperate need of a dict similar structure
that allows sets and/or dicts as keys <i>and</i> values. My
application is NLP conceptual plagiarism detection. Dealing with
infinite grammars communicating illogical concepts. Would be
even better if keys could nest the same data structure, e.g.
set(s) or dict(s) in set(s) or dict(s) of the set(s) or dict(s)
as key(s).
<div><br>
<div>In order to detect conceptual plagiarism, I need to
populate a data structure with if/then equivalents as a
decision tree. But my equivalents have potentially infinite
ways of arranging them syntactically<i> and</i>
semantically. </div>
<div><br>
</div>
<div>A dict having keys with identical set values treats each
key as a distinct element. I am dealing with semantics or
elemental equivalents and many different statements treated
as equivalent statements involving if/then (key/value) or a
implies b, where a and/or b can be an element or an if/then
as an element. Modeling the syntactic equivalences of such
claims is paramount, and in order to do that, I need the
data structure. </div>
</div>
<div><br>
</div>
<div>Hello, I am Stephanie. I have never contributed to any open
source. I am about intermediate at python and I am a
self-directed learner/hobbyist. I am trying to prove with my
code that a particular very famous high profile pop debate
intellectual is plagiarizing Anders Breivik. I can show it via
observation, but his dishonesty is dispersed among many
different talks/lectures. I am dealing with a large number of
speaking hours as transcripts containing breadcrumbs that are
very difficult for a human to piece together as having come
from the manifesto which is 1515 pages and about half copied
from other sources. The concepts stolen are rearrangements and
reorganizations of the same identical claims and themes. He
occasionally uses literal string plagiarism but not very much
at once. He is very good at elaboration which makes it even
more difficult. </div>
<div><br>
</div>
<div>Thank you, for your time, </div>
<div>Stephanie </div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Python-ideas mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Python-ideas@python.org">Python-ideas@python.org</a>
<a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/python-ideas">https://mail.python.org/mailman/listinfo/python-ideas</a>
Code of Conduct: <a class="moz-txt-link-freetext" href="http://python.org/psf/codeofconduct/">http://python.org/psf/codeofconduct/</a>
</pre>
</blockquote>
</body>
</html>