已发布包的命名空间? [英] namespace for released packages?

查看:76
本文介绍了已发布包的命名空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

发布包名称空间的python约定是什么?在

Java中你会向后写你的域名(如果有的话),这个:


uk.org.ohmslaw.myPackage

....从而确保独特性。对于Python来说是一样的吗?


谢谢

alex

What is the python convention for namespaces of released packages? In
Java you''d write your domain name (if you have one) backwards, this:

uk.org.ohmslaw.myPackage

.... thus ensuring uniqueness. Is it the same for Python?

thanks
alex

推荐答案

Alex Hunsley写道:
Alex Hunsley wrote:
发布包名称空间的python约定是什么?在
Java中你会向后写你的域名(如果你有的话),这个:

uk.org.ohmslaw.myPackage

...从而确保独特性。对于Python来说是一样的吗?

感谢
alex
What is the python convention for namespaces of released packages? In
Java you''d write your domain name (if you have one) backwards, this:

uk.org.ohmslaw.myPackage

... thus ensuring uniqueness. Is it the same for Python?

thanks
alex




我认为缺少回复和我看到了什么关于网上的代码

意味着操作方式只是让你的python位于顶部

级别,而不是在一个使它独特的包中...我找到这个相当

怪!模块名称冲突不会出现问题吗?


alex



I presume the lack of replies and what I''ve seen on code on the net
means that the modus operandi is to just have your python at the top
level, and not in a package that makes it unique... I find this quite
strange! Do problems not arise due to module name clashes?

alex




" Alex Hunsley" ; < LA ** @ tardis.ed.ac.molar.uk>在消息中写道

新闻:iU ****************** @ fe1.news.blueyonder.co.u k ...

"Alex Hunsley" <la**@tardis.ed.ac.molar.uk> wrote in message
news:iU******************@fe1.news.blueyonder.co.u k...
Alex Hunsley写道:
Alex Hunsley wrote:
发布包名称空间的python约定是什么?在
Java中你会向后写你的域名(如果你有的话),这个:

uk.org.ohmslaw.myPackage

...从而确保独特性。对于Python来说它是一样的吗?
What is the python convention for namespaces of released packages? In
Java you''d write your domain name (if you have one) backwards, this:

uk.org.ohmslaw.myPackage

... thus ensuring uniqueness. Is it the same for Python?


我认为缺少回复以及我在网上的代码中看到的内容
意味着操作方法只是让你的python在顶级
级别,而不是一个让它独一无二的包......我觉得这很奇怪!模块名称冲突不会出现问题吗?


I presume the lack of replies and what I''ve seen on code on the net
means that the modus operandi is to just have your python at the top
level, and not in a package that makes it unique... I find this quite
strange! Do problems not arise due to module name clashes?




第三方软件包通常放在site-packages目录中。所以

远,名字冲突没有太多问题。


tjr



Third party packages are generally put in the site-packages directory. So
far, there has not be much problem with name clashes.

tjr


-----开始PGP签名消息-----

哈希:SHA1

2004年7月18日,晚上8:07,Alex Hunsley写道:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 18/07/2004, at 8:07 PM, Alex Hunsley wrote:
Alex Hunsley写道:
Alex Hunsley wrote:
发布包名称空间的python约定是什么?在Java中你会向后写你的域名(如果你有的话),这个:
uk.org.ohmslaw.myPackage
...从而确保唯一性。对于Python来说它是一样的吗?
感谢
alex
What is the python convention for namespaces of released packages? In
Java you''d write your domain name (if you have one) backwards, this:
uk.org.ohmslaw.myPackage
... thus ensuring uniqueness. Is it the same for Python?
thanks
alex



我认为缺少回复以及我在网上的代码上看到了什么
意味着操作方法只是让你的python处于顶级水平,而不是在一个让它独一无二的包中......我觉得这很奇怪!模块名称冲突不会出现问题吗?



I presume the lack of replies and what I''ve seen on code on the net
means that the modus operandi is to just have your python at the top
level, and not in a package that makes it unique... I find this quite
strange! Do problems not arise due to module name clashes?




冲突非常罕见 - 模块作者一般都很好b $ b足够好确保没有其他人在发布东西之前使用他们的包名

并且通常将所有内容打包到

a单顶级模块中。


- -

Stuart Bishop< st **** @ stuartbishop.net>
http://www.stuartbishop.net/

----- BEGIN PGP SIGNATURE -----

版本:GnuPG v1.2.3(达尔文)


iD8DBQFA + tXEAfqZj7rGN0oRAgSOAJ96UwUBXtJ8WMUd2hAUt + jqX7l90QCePqKr

TQ6ISW / 8pMvvHZoY2PH4nEo =

= Fo / D

----- END PGP SIGNATURE -----



It is pretty rare to get clashes - module authors are generally
nice enough to make sure nobody else is using their package name
before releasing things and generally package everything into
a single top-level module.

- --
Stuart Bishop <st****@stuartbishop.net>
http://www.stuartbishop.net/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQFA+tXEAfqZj7rGN0oRAgSOAJ96UwUBXtJ8WMUd2hAUt+ jqX7l90QCePqKr
TQ6ISW/8pMvvHZoY2PH4nEo=
=Fo/D
-----END PGP SIGNATURE-----


这篇关于已发布包的命名空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆