代码之家  ›  专栏  ›  技术社区  ›  ts.

python 3.x有LINQ吗?

  •  1
  • ts.  · 技术社区  · 14 年前

    它存在吗?有 http://github.com/heynemann/pynq ,但仅适用于2.5

    3 回复  |  直到 14 年前
        1
  •  1
  •   hughdbrown    14 年前

    正如SilentGhost所建议的,跑步 2to3 揭示了对到python 3.x的端口所做的更改很少。大体上,它们是:

    1. unicode() str()
    2. 删除unicode字符串常量上的“u”
    3. dict.has_key() dict.in
    4. 改变 cStringIO io
    5. 改变 StringIO.next StringIO.__next__

    我会给你全部报价,但输出不会发挥良好的堆栈溢出格式化程序。

        2
  •  3
  •   Rob Smallshire    14 年前

    你可以试试 asq 对于Python2(2.6和2.7),这是一个完整的基于LINQ的实现 Python3(所有版本)。查询 asq

    完全公开:我是 .

        3
  •  0
  •   Omer Mor    12 年前

    有一个官方的微软 在制品 Python的Rx实现 Rx.py . 它包括LINQ to objects(IEnumerable)的基本实现,您可以在这里看到: http://rxpy.codeplex.com/SourceControl/latest#rx/internal/enumerable.py .