[pyar] Nombrando clases en Python (convenciones)

Daniel dmlistapython en gmail.com
Mar Oct 8 07:13:37 ART 2013


>
> Yo usé poco Google Go, pero por lo que entiendo SIEMPRE se hace
> referencia una clase por el nombre del paquete. En sintaxis Python,
> esto significa que haces
>
> >>> import ftp
> >>> f = ftp.Server()
>
> y no:
>
> >>> from ftp import Server
> >>> f = Server()
>
> Esto significa que siempre tenes el nombre del módulo a mano cuando lo
> usas.
>
>
> Pregunta al margen (de novato) hacer import ftp en lugar de  from ftp
import Server
¿no demanda más memoria?
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20131008/15fb5158/attachment.html>


More information about the pyar mailing list