A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-October/009964.html below:

[Python-Dev] Wierd buffer "add" behaviour.

[Python-Dev] Wierd buffer "add" behaviour. [Python-Dev] Wierd buffer "add" behaviour.Mark Hammond MarkH@ActiveState.com
Mon, 16 Oct 2000 10:49:19 +1100
I just struck this, and wonder if it is intentional:

* Adding 2 buffer objects together yields a string.  Fair enough.
* Adding a buffer and a string yields a type error!  Eeek.

This yields the following strange behaviour:

>>> a=buffer('a')
>>> a+a
'aa'
>>> a+a+a
Traceback (innermost last):
  File "<interactive input>", line 1, in ?
TypeError: cannot add type "buffer" to string
>>> 

That doesnt seem correct to me?

Mark.



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4