Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Tuples passed in parameters are not accessible by name

オープン
#151 コメント 13 件 リアクション 0 件 担当者 1 名 GitHub で見る

@wenhzha がすでに取り組んでいます。

2020年11月10日 から。

評価

この issue はまだ評価されていません。

説明

Enhancement P2

Please note that I may be doing things wrong but it seems like it should work. I had to use deconstruction to make it work.

Please see the commented code in the activity section.

To reproduce

Azure Functions Core Tools (3.0.2630 Commit hash: beec61496e1c5de8aa4ba38d1884f7b48233a7ab)
Function Runtime Version: 3.0.13901.0
Python 3.7.7
Orchestrator
from collections import namedtuple
import azure.functions as func
import azure.durable_functions as df


def orchestrator_function(context: df.DurableOrchestrationContext):
    Location = namedtuple('Location', ['city', 'state'])
    location = Location(city='Seattle', state= 'WA')

    weather = yield context.call_activity("GetWeather", location)

    # ...

Activity
import logging
from collections import namedtuple

Location = namedtuple('Location', ['city', 'state'])

def main(location: Location) -> str:
    city, state = location
    # THIS DOESN'T WORK 👇
    # return f"Hello {location.city}, {location.state}!"  
    return f"Hello {city}, {state}!"
主要言語
Python
スター
157
フォーク
71
PR マージ指標
30日以内にマージされた PR はありません

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/azure-functions-durable-python のほかの issue

Azure/azure-functions-durable-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。