New submission from Eli Bendersky <eli...@gmail.com>:

The comment string above the implementation of _PyBytes_FromStringAndSize in 
Objects/bytesobject.c starts with:

  /*
  For both PyBytes_FromString() and PyBytes_FromStringAndSize(), the
  parameter `size' denotes number of characters to allocate, not 
  counting   any null terminating character.

This is misleading since PyBytes_FromString() has no 'size' parameter. 

The problem also exists for PyString in Python 2.x

----------
assignee: docs@python
components: Documentation
keywords: easy
messages: 131750
nosy: docs@python, eli.bendersky
priority: low
severity: normal
status: open
title: misleading comment on PyBytes_FromStringAndSize
versions: Python 3.2, Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11634>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to