awsdocs/aws-glue-developer-guide

Update all code samples to be compatible with Python 3

Bio2hazard opened this issue · 2 comments

Python 3 is the default for new AWS Glue jobs, and python 3 has a breaking change vs. python 2 when it comes to print statements.

Almost all samples in the glue documentation have print statements to give new developers debug output to show them what the different functions do - which is great - but unfortunately this means that all the samples now cause exceptions and will not run.

It would be great if you could either update all samples to have print statements with parenthesis
print "Full record count: ", dyF.count() -> print('Full record count: ', dyF.count())

Or at least put a red banner somewhere to make it clear that the samples are only valid for Python 2.x.

Hi @Bio2hazard . We have created an action item to address this in the Glue Developer Guide. I do not have an estimate yet on when this will be completed.