🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #9586

Re: [Python] Sacar algo de dentro de una función

#9586
From: Pere Pujal Carabantes
Date: Thu, 13 Jun 2002 19:32
45 lines
2058 bytes
El Thu, 13 Jun 2002 19:52:30 +0200,en David SF 
va escriure en es.comp.os.linux.programacion:

> On 13.06.2002, Pere Pujal Carabantes wrote in es.comp.os.linux.programacion
> 
>>  def nueva_tupla(nombre):
>>      texte={}
>>      imatge={}
>>      nombre=(texte,imatge)
>>      print nombre # imprime ({}, {}) con lo cual compruebo
>>  		 # que al menos se ha creado
>>      return nombre
>>  
>>  nueva_tupla('hola')
>>  print hola
> 
> No ser�a algo como..
> 
>     def nueva_tupla():
>         texte = {}
>         imatge = {}
>         return (texte, imatge)
>         
>     t1 = nueva_tupla()
>     print t1

Tal vez no me he explicado bien:
La idea es crear una tupla que tenga por nombre la cadena de texto que voy a 
sacar por otro lado procesando un fichero y que no sabr� hasta que me 
encuentre ese fichero en tiempo de ejecuci�n.


> 
> ..aunque no entiendo muy bien el sentido de esa funci�n.. quiz�s porque no
> s� mucho python y me estoy perdiendo algo ;)

Pues anda que yo... :)


> 
> Saludos.

Salut

Pere
Technical Details
Message-ID: <slrnaghsph.1gu.pere@hola.fou.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!134.222.94.5!npeer.kpnqwest.net!EU.net!news.airtel.net!127.0.0.1!nobody
References: <slrnaghlv1.s0.pere@hola.fou.net> <u4maea.h41.ln@dookie.hn.org>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,ea94857271ee2d0f
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2002-06-13 11:32:30 PST
Newsgroups: es.comp.os.linux.programacion
From: Pere Pujal Carabantes <pere@hola.fou.net>
Subject: Re: [Python] Sacar algo de dentro de una
 función
References: <slrnaghlv1.s0.pere@hola.fou.net> <u4maea.h41.ln@dookie.hn.org>
Message-ID: <slrnaghsph.1gu.pere@hola.fou.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8bit
User-Agent: slrn/0.9.7.3 (Linux)
Date: Thu, 13 Jun 2002 21:32:01 +0200
NNTP-Posting-Host: 212.166.166.73
X-Original-NNTP-Posting-Host: 212.166.166.73
X-Trace: news.airtel.net 1023993136 212.166.166.73 (13 Jun 2002 20:32:16 +0200)
Lines: 45
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!134.222.94.5!npeer.kpnqwest.net!EU.net!news.airtel.net!127.0.0.1!nobody