Re: [Python-Dev] Automatic Scope Macros

2007-04-24 Thread Kristján Valur Jónsson
To: python-dev@python.org Subject: Re: [Python-Dev] Automatic Scope Macros Calvin Spealman schrieb: > Could we use and add this macro to object.h? It could be a much > cleaner and safer way of dealing with new references you want to clean > up in the same scope. In most cases, you will h

Re: [Python-Dev] Automatic Scope Macros

2007-04-24 Thread Georg Brandl
Calvin Spealman schrieb: > Could we use and add this macro to object.h? It could be a much > cleaner and safer way of dealing with new references you want to clean > up in the same scope. The first one will make sure to decref your new > reference when you are done with it. The second one will make

[Python-Dev] Automatic Scope Macros

2007-04-24 Thread Calvin Spealman
Could we use and add this macro to object.h? It could be a much cleaner and safer way of dealing with new references you want to clean up in the same scope. The first one will make sure to decref your new reference when you are done with it. The second one will make sure to set a borrowed reference