<h1>API refactoring<aclass="headerlink"href="#api-refactoring"title="Permalink to this headline">¶</a></h1>
<p>Building up to Evennia 1.0 and beyond, it’s time to comb through the Evennia API for old cruft. This whitepage is for anyone interested to contribute with their views on what part of the API needs refactoring, cleanup or clarification (or extension!)</p>
<p>Note that this is not a forum. To keep things clean, each opinion text should ideally present a clear argument or lay out a suggestion. Asking for clarification and any side-discussions should be held in chat or forum.</p>
<hrclass="docutils"/>
<divclass="section"id="griatch-aug-13-2019">
<h2>Griatch (Aug 13, 2019)<aclass="headerlink"href="#griatch-aug-13-2019"title="Permalink to this headline">¶</a></h2>
<p>This is how to enter an opinion. Use any markdown needed but stay within your section. Also remember to copy your text to the clipboard before saving since if someone else edited the wiki in the meantime you’ll have to start over.</p>
</div>
<divclass="section"id="griatch-sept-2-2019">
<h2>Griatch (Sept 2, 2019)<aclass="headerlink"href="#griatch-sept-2-2019"title="Permalink to this headline">¶</a></h2>
<p>I don’t agree with removing explicit keywords as suggested by <aclass="reference external"href="/API-refactoring.html#reduce-usage-of-optionalpositional-arguments-aug-29-2019">Johnny on Aug 29 below</a>. Overriding such a method can still be done by <codeclass="docutils literal notranslate"><spanclass="pre">get(self,</span><spanclass="pre">**kwargs)</span></code> if so desired, making the kwargs explicit helps IMO readability of the API. If just giving a generic <codeclass="docutils literal notranslate"><spanclass="pre">**kwargs</span></code>, one must read the docstring or even the code to see which keywords are valid.</p>
<p>On the other hand, I think it makes sense to as a standard offer an extra <codeclass="docutils literal notranslate"><spanclass="pre">**kwargs</span></code> at the end of arg-lists for common methods that are expected to be over-ridden. This make the API more flexible by hinting to the dev that they could expand their own over-ridden implementation with their own keyword arguments if so desired.</p>
</div>
<hrclass="docutils"/>
<divclass="section"id="johnny">
<h2>Johnny<aclass="headerlink"href="#johnny"title="Permalink to this headline">¶</a></h2>
<h3>Reduce usage of optional/positional arguments (Aug 29, 2019)<aclass="headerlink"href="#reduce-usage-of-optional-positional-arguments-aug-29-2019"title="Permalink to this headline">¶</a></h3>
<p>Many classes have methods requiring lengthy positional argument lists, which are tedious and error-prone to extend and override especially in cases where not all arguments are even required. It would be useful if arguments were reserved for required inputs and anything else relegated to kwargs for easier passthrough on extension.</p>