mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Python: Highlight that __slots__ query is only for Python 2 in qhelp
Since I was already editing this file, it was easy to just add this extra bit of info.
This commit is contained in:
@@ -16,7 +16,7 @@ You can convert an old-style class to a new-style class by inheriting from <code
|
||||
|
||||
</recommendation>
|
||||
<example>
|
||||
<p>In the following example the <code>Point</code> class is an old-style class (no inheritance). The
|
||||
<p>In the following Python 2 example the <code>Point</code> class is an old-style class (no inheritance). The
|
||||
<code>__slots__</code> declaration in this class creates a class attribute called <code>__slots__</code>, the class
|
||||
dictionary is unaffected. The <code>Point2</code> class is a new-style class so the
|
||||
<code>__slots__</code> declaration causes special compact attributes to be created for each name in
|
||||
|
||||
Reference in New Issue
Block a user