Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samples - Updated the Data passing in python tutorial #2868

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Stopped shadowing the system list type
  • Loading branch information
Ark-kun committed Jan 30, 2020
commit c9a4631e295e480f5874a1dd36b8213c270f4a56
6 changes: 3 additions & 3 deletions samples/tutorials/Data passing in python components.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,16 @@
"outputs": [],
"source": [
"@func_to_container_op\n",
"def get_item_from_list(list: list, index: int) -> str:\n",
" return list[index]\n",
"def get_item_from_list(list_of_strings: list, index: int) -> str:\n",
" return list_of_strings[index]\n",
"\n",
"@func_to_container_op\n",
"def truncate_text(text: str, max_length: int) -> str:\n",
" return text[0:max_length]\n",
"\n",
"def processing_pipeline(text: str = \"Hello world\"):\n",
" truncate_task = truncate_text(text, max_length=5)\n",
" get_item_task = get_item_from_list(list=[3, 1, truncate_task.output, 1, 5, 9, 2, 6, 7], index=2)\n",
" get_item_task = get_item_from_list(list_of_strings=[3, 1, truncate_task.output, 1, 5, 9, 2, 6, 7], index=2)\n",
" print_small_text(get_item_task.output)\n",
"\n",
"\n",
Expand Down