import pywikibot

def addsection(title, summary, text):
    page = pywikibot.Page(site, title)
    result = pywikibot.site.APISite.editpage(
        site,
        page=page,
        summary=summary,
        minor=False,
        text=text,
        section="update"
    )
    return result

site=pywikibot.Site('nl', 'wikipedia')
title='Overleg gebruiker:RonnieV'
summary='Let''s try ome more hacking'
text='Het toevoegen van een sectie met inhoud kan ook op deze wijze'
addsection(title, summary, text)
Sleeping for 9.0 seconds, 2018-10-31 00:01:52
WARNING: API error invalidsection: The "section" parameter must be a valid section ID or "new".
---------------------------------------------------------------------------
APIError                                  Traceback (most recent call last)
<ipython-input-1-361a50b8b6bc> in <module>()
     17 summary='Let''s try ome more hacking'
     18 text='Het toevoegen van een sectie met inhoud kan ook op deze wijze'
---> 19 addsection(title, summary, text)

<ipython-input-1-361a50b8b6bc> in addsection(title, summary, text)
      9         minor=False,
     10         text=text,
---> 11         section="update"
     12     )
     13     return result

/srv/paws/pwb/pywikibot/site.py in callee(self, *args, **kwargs)
   1320             else:
   1321                 raise Exception('Not implemented')
-> 1322             return fn(self, *args, **kwargs)
   1323 
   1324         if not __debug__:

/srv/paws/pwb/pywikibot/site.py in editpage(self, page, summary, minor, notminor, bot, recreate, createonly, nocreate, watch, **kwargs)
   5216             while True:
   5217                 try:
-> 5218                     result = req.submit()
   5219                     pywikibot.debug('editpage response: %s' % result,
   5220                                     _logger)

/srv/paws/pwb/pywikibot/data/api.py in submit(self)
   2271                               % result)
   2272 
-> 2273                 raise APIError(**result['error'])
   2274             except TypeError:
   2275                 raise RuntimeError(result)

APIError: invalidsection: The "section" parameter must be a valid section ID or "new". [help:See https://nl.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce&gt; for notice of API deprecations and breaking changes.]