python-sortedcontainers icon indicating copy to clipboard operation
python-sortedcontainers copied to clipboard

Merge SortedList and SortedKeyList Into a Single Class

Open xintenseapple opened this issue 11 months ago • 2 comments

From what I can tell, SortedList and SortedKeyList are functionally interchangeable aside from the slight memory overhead of the SortedKeyList._keys list in SortedKeyList. A simpler implementation would be to use SortedKeyList for everything and default the key to the identity function, which is actually already the case for SortedKeyList. This would allow removal of the custom SortedList.__new__ function and, more importantly, properly type hint the classes and methods without getting invalid signatures.

Is there are concrete reason these classes exist separately other than the small overhead associated with SortedKeyList._keys?

xintenseapple avatar Dec 17 '25 23:12 xintenseapple

Verzeichnis aufzulisten. localhost> localhost> C.berlinnn01-pass:C6790!?**** Unbekannter Befehl: 'c.berlinnn01-pass: C67901?' localhost> srt_ceren01 pass: SrtC58 Unbekannter Befehl: 'srt_ceren01 pass: srtc58****' Um einen Befehl auszuführen kannst du entweder den Befehl oder seine Kurzform (in Klammern dargestellt) eingeben. Zum Beispiel kannst du statt 'help' auch nur 'h' tippen. Einige Befehle benötigen einen Parameter. Beispielsweise muss eine Datei, die gezeigt werden soll, mitangegeben werden. Gebe 'show tipl' ein um diese zu sehen. localhost> ceren bln01 -Pass:456890*** Unbekannter Befehl: 'ceren_bln01 -pass:456890***' localhost>

sqc6fgqpdp-collab avatar Jan 21 '26 20:01 sqc6fgqpdp-collab

No Implicit Access: When you authorize an app, it can only access the specific repositories and data scopes (e.g., read-only, read/write) that you explicitly grant it. The "Repo C" Scenario: If an app requests access to Repo A and B, it cannot access your private "Repo C" unless you specifically grant it permission to that repository during the installation process. Two-Step Security: Users can authorize an app (allowing it to know who they are) without installing it (giving it access to code). GitHub Docs GitHub Docs +2 2. User Permission Limits The "Sneak" Scenario (Repo A): An app acts on your behalf using a user-to-server token. A fundamental rule is that the app cannot do anything that you cannot do. If you are not a collaborator on Repo A, or if you only have read access, the app is restricted by the exact same limitations. Individual Access: If an app is installed by a user, it only has access to repositories that user can access. GitHub Docs GitHub Docs +2 3. Organization-Level Controls Owner Approval: In organizations, owners can set policies to restrict app installations. They can require that any new app installation be reviewed and approved, preventing users from installing unauthorized or potentially rogue apps. Removing Access: If an app behaves unexpectedly, the user or organization owner can revoke its access, which immediately invalidates its tokens. GitHub Docs GitHub Docs +2 4. GitHub Apps vs. Classic Tokens Fine-Grained Permissions: GitHub Apps allow for much more granular permissions than old OAuth apps or Personal Access Tokens (PATs). You can restrict a GitHub App to specific repositories, whereas a classic PAT often has broader access. Short-Lived Tokens: GitHub App installation tokens expire, which limits the potential damage if a token were leaked. GitHub Docs GitHub Docs +1 In summary, the security model, which includes explicit repository selection during installation, ensures that an app is restricted to a subset of your data and cannot act beyond your own user permissions. GitHub Docs GitHub Docs

diegomontanopsn-max avatar Mar 01 '26 23:03 diegomontanopsn-max